Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: different color for each option #27

Open
chengkangzai opened this issue Dec 16, 2024 · 0 comments
Open

[Feature Request]: different color for each option #27

chengkangzai opened this issue Dec 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@chengkangzai
Copy link

What happened?

Feature Request: Color customization for RadioDeck options

First of all, thank you for creating such an amazing package! I've been using it in my projects and it's been incredibly helpful.

Current Behavior

Currently, RadioDeck allows us to create beautiful radio button groups with options like this:

RadioDeck::make('What do you feel')
    ->columns(5)
    ->options([
        '5' => 'Very Satisfied',
        '4' => 'Satisfied',
        '3' => 'Neutral',
        '2' => 'Dissatisfied',
        '1' => 'Very Dissatisfied',
    ]),

Feature Suggestion

I was wondering if it might be possible to add color customization for individual options? Something like this:

phpCopyRadioDeck::make('What do you feel')
    ->columns(5)
    ->color([
        '5' => 'green',
        '4' => 'emerald',
        '3' => 'gray',
        '2' => 'yellow',
        '1' => 'red',
    ]),

This would be particularly useful for satisfaction surveys or rating systems where color coding could enhance the user experience.

Use Cases

  • Satisfaction surveys
  • Rating systems
  • Status indicators
  • Risk assessments

I completely understand if this doesn't align with the package's roadmap or if there are technical limitations. Please let me know if you need any clarification or if there's already a better way to achieve this.
Thanks for considering this suggestion! 🙏

How to reproduce the bug

Its a feature request

btw... i wish to use the feature under discussion but it doesnt seems like working

Package Version

1.2.9

PHP Version

8.2.0

Laravel Version

10.0.0

Which operating systems does with happen with?

No response

Notes

No response

@chengkangzai chengkangzai added the bug Something isn't working label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant