- Components
- Layout
Direction
Base UI's DirectionProvider and useDirection, unstyled. Wrap a subtree so Base UI parts (slider, tabs, menus) follow right-to-left; set dir on the markup too.
Installation#
npx shadcn add @ortaui/directionExamples#
Right to left#
API reference#
| Prop | Type | Default | Description |
|---|---|---|---|
| direction | "ltr" | "rtl" | "ltr" | DirectionProvider: direction for Base UI descendants. |
| useDirection() | () => { direction } | - | Reads the current direction. |