Configure right-to-left layouts and migrate Sora UI components for Arabic, Hebrew, Persian, and other RTL languages.
Sora UI follows the RTL workflow introduced by shadcn/ui. The setup below covers Next.js, Vite, and TanStack Start.
Create a project
Choose the template for your framework:
This creates a components.json file with the rtl: true flag.
Existing projects
Add rtl: true to components.json to enable RTL-aware component generation
and migration:
For an existing project, migrate components incrementally with the shadcn CLI:
Limit the migration to a file or directory:
The migration converts physical properties to logical equivalents such as
ml-* to ms-*, left-* to start-*, and side="right" to
side="inline-end".
Runtime direction
rtl: true configures the CLI but does not change the browser direction.
Your application must set both the document dir attribute and the
Base UI DirectionProvider:
Use lang="ar" for Arabic, lang="he" for Hebrew, lang="fa" for Persian,
or the appropriate locale for your application.
Next.js
In an App Router project, configure the root layout:
Vite
Set the direction in index.html and provide the Base UI direction in
src/main.tsx:
Install an Arabic font with your package manager and import it in
src/index.css:
TanStack Start
Set dir="rtl" and lang="ar" on the root document and wrap the app in
src/routes/__root.tsx:
For Arabic fonts, install @fontsource-variable/noto-sans-arabic and import
it in your stylesheet. For Hebrew, use the corresponding Hebrew font package.
Component support
RTL support is being rolled out progressively across the Sora UI registry. The goal is to make every component work correctly in RTL layouts, including popup placement, directional icons, keyboard navigation, and horizontal animations.
Until the migration is complete, review each component's documentation and
test it in both LTR and RTL contexts before shipping. Components that use
direction-sensitive positioning or animation may require the
DirectionProvider, logical CSS utilities, and an explicit dir attribute.
Built by Axyl. A motion-first component registry for React.
Last updated: 9/10/2026