Skip to content

Direction

Free

Sets the reading direction for the parts inside it. In right to left, arrow keys swap and menus open on the correct side.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Wrap the app, and set dir on the same element or on <html>.

app-root.tsx
  • Wrap the app in DirectionProvider direction="rtl" and set dir="rtl" on <html>.
  • Use useDirection() in your own component when its behavior depends on the direction.
  • To flip only the layout, set dir alone: the components use logical classes.

In right to left, the arrow keys follow the reading order: ArrowLeft moves to the next tab.

  1. AddedDirection.
Open the release