Looking for a tri-state toggle pattern #6429
-
I'd like to implement something like a toggle button but with three states instead of two, similar to Spotify's "loop track" / "loop playlist" / "don't loop" toggle. It doesn't look like React Aria supports this kind of thing directly. Both the Switch and the ToggleButton are two-state. The Checkbox component supports a third state, "indeterminate", which doesn't fit my use case. Anyone have a recommendation? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You could swap out the button in rotation, placing focus on the new one as it is rendered. Otherwise, just swap out the contents and use a live announcer if it's not announcing the change? |
Beta Was this translation helpful? Give feedback.
You could swap out the button in rotation, placing focus on the new one as it is rendered. Otherwise, just swap out the contents and use a live announcer if it's not announcing the change?