website
website copied to clipboard
Consider being more precise in terms of what the `orientation` prop does (ie. no visual changes).
Bug report
Current Behavior
The orientation prop has no effect on ToggleGroup
. No matter what, the ToggleGroup has a horizontal orientation.
Expected behavior
Similar to the Slider, orientation
ought to change the ToggleGroup's orientation; otherwise it should be removed as an option
Reproducible example
Note The following link comes directly from the ToggleGroup docs. I am also seeing this issue when running locally.
Your environment
Software | Name(s) | Version |
---|---|---|
Radix Package(s) | @radix-ui/react-toggle-group | 1.0.0 |
React | n/a | 18.0.0 |
Browser | Chrome | 105.0.5195.52 |
Assistive tech | ||
Node | n/a | 16.15.0 |
npm/yarn | pnpm | 6.32.13 |
Operating System | macOS | Monterey 12.5.1 |
since radix is a style-free library, the orientation
prop won't change the visual orientation but will change the functional orientation. in the case of ToggleGroup
, vertical orientation will mean up/down arrow keys move focus within the component which appears to be working fine: https://codesandbox.io/s/awesome-edison-kyfiwr?file=/App.js
is there something else you are expecting here?
@benoitgrelard @andy-hook i wonder if it would be handy to update the docs surrounding this prop because the current docs aren't very clear here:
Yeah, @jjenzz is correct. I will rename and transfer this issue to the website repo instead for us to follow up on.
Could the same be done for the Radio component?