ortaui
  1. Components
  2. 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/direction

Examples#

Right to left#

API reference#

PropTypeDefaultDescription
direction"ltr" | "rtl""ltr"DirectionProvider: direction for Base UI descendants.
useDirection()() => { direction }-Reads the current direction.