Component
Sets the reading direction once for every Rad UI component inside, so right-to-left apps don't pass dir to each one.
View component changelogpreview
المحتوى الأول
- One wrapper sets right-to-left keyboard navigation for every component inside
- Covers Tabs, TabNav, ToggleGroup, Toolbar, RadioGroup, CheckboxGroup, Accordion, menus, Menubar, NavigationMenu, Splitter, Slider, Select and Combobox
- A component's own dir prop still wins
- useDirection reads it in your own components
Import all parts of the component and piece them together
Provides the direction. It renders no element: set dir on <html> as well so text and CSS follow. A component's own dir prop still wins.
| Prop | Type | Default |
|---|---|---|
dir | 'ltr' | 'rtl' | -- |
children | ReactNode | -- |
| Shortcut | Description |
|---|---|
ArrowLeft | In rtl, moves to the next item in horizontal components. |
ArrowRight | In rtl, moves to the previous item in horizontal components. |
| Reference | What Rad UI follows |
|---|---|
Horizontal arrow keys follow the reading direction, as the APG patterns require for right-to-left languages. |