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

Add "indeterminate" state to Switch component #2896

Open
is-jonreeves opened this issue May 13, 2024 · 0 comments
Open

Add "indeterminate" state to Switch component #2896

is-jonreeves opened this issue May 13, 2024 · 0 comments

Comments

@is-jonreeves
Copy link

Feature request

Overview

Checkboxes allow for an indeterminate state, and Radix Switches appear to use checkboxes under-the-hood. It would be good to expose this option and provide a visual change to represent it.

It would be useful in "batch edit" scenarios where you are controlling the value for multiple subjects at once. For example, selecting Multiple Users and then toggling an option for all of them.

Examples in other libraries

A Google Images search surfaces a bunch of examples of indeterminate Switches/Toggles, but honestly I didn't find many UI libraries in the React space that cater for it.

Additional context

It doesn't seem too common, so I'm doubtful its a wise UX pattern to encourage (I suspect a real checkbox is more appropriate in the scenario I laid out above). BUT... if your UI is already designed and implemented around Switches, having this feature as an option would be useful, otherwise it would mean replacing all your Switches for Checkboxes or building an entirely different experience just for a bulk/batch interactions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant