shadcn/ui Direction
A provider component that sets the text direction (LTR or RTL) for your application. Essential for supporting right-to-left languages like Arabic, Hebrew, and Persian.
Shadcn/ui Direction - Figma Component
A provider component that sets the text direction (LTR or RTL) for your application. Essential for supporting right-to-left languages like Arabic, Hebrew, and Persian. This Figma component is part of our comprehensive design system that brings the popular shadcn/ui library into your design workflow.
Every Direction variant includes all the necessary states, properties, and styling options you need to create consistent, production-ready designs. The component seamlessly integrates with your existing Figma files and maintains full compatibility with the shadcn/ui React implementation.
Features
- DirectionProvider sets text direction (ltr or rtl) for the app
- Essential for right-to-left languages (Arabic, Hebrew, Persian)
- useDirection hook returns current direction in components
- Works with html dir attribute for proper RTL layout
- Radix UI primitive—accessible and consistent with shadcn/ui
- Design RTL interfaces in Figma that match production behavior
Browse all 56 components
- Accordion5 variants
- Alert Dialog5 variants
- Alert4 variants
- Aspect Ratio2 variants
- Avatar8 variants
- Badge5 variants
- Breadcrumb5 variants
- Button Group10 variants
- Button13 variants
- Calendar9 variants
- Card4 variants
- Carousel5 variants
- Chart6 variants
- Checkbox6 variants
- Collapsible3 variants
- Combobox10 variants
- Command4 variants
- Context Menu8 variants
- Data Table1 variant
- Date Picker6 variants
- Dialog4 variants
- Direction1 variant
- Drawer3 variants
- Dropdown Menu11 variants
- Empty5 variants
- Field11 variants
- Hover Card2 variants
- Input Group12 variants
- Input OTP8 variants
- Input13 variants
- Item9 variants
- Kbd4 variants
- Label1 variant
- Menubar4 variants
- Navigation Menu1 variant
- Pagination2 variants
- Popover3 variants
- Progress2 variants
- Radio Group5 variants
- Resizable2 variants
- Scroll Area1 variant
- Select5 variants
- Separator3 variants
- Sheet2 variants
- Sidebar1 variant
- Skeleton5 variants
- Slider5 variants
- Sonner3 variants
- Spinner6 variants
- Switch5 variants
- Table2 variants
- Tabs4 variants
- Textarea4 variants
- Toggle Group6 variants
- Toggle4 variants
- Tooltip3 variants
RTL design in Figma
The shadcn/ui figma Direction component helps you design right-to-left interfaces for Arabic, Hebrew, and Persian. Use the same layout and components in Figma with mirrored alignment and flow. This shadcn figma component keeps RTL and LTR consistent from design to code.
DirectionProvider and useDirection
Design apps that support multiple languages and directions in Figma with the shadcn/ui figma Direction—DirectionProvider sets app-wide direction, useDirection lets components adapt. Prototype language switchers and RTL layouts that match shadcn/ui behavior.
Accessible RTL with shadcn figma
This shadcn figma Direction component follows Radix UI Direction patterns. Design accessible RTL in Figma so focus order, reading order, and alignment translate correctly when developers implement with DirectionProvider and the proper dir attribute.
Your questions, answered
Common questions about the Direction component in the shadcn/ui Figma kit.
Use DirectionProvider when your app supports RTL languages (Arabic, Hebrew, Persian, Urdu, etc.) or when you need to switch between LTR and RTL based on locale or user preference. Wrap your app (or the relevant subtree) with DirectionProvider and set the direction prop.
Import useDirection from your direction component. Call it inside any child of DirectionProvider to get the current direction ("ltr" or "rtl"). Use it to flip layouts, icons, or margins conditionally so your UI adapts correctly to RTL.
Yes. Set the html element's dir attribute (e.g. <html dir="rtl">) for correct document flow and DirectionProvider with the same direction so React components that use useDirection stay in sync. This ensures both static content and dynamic UI respect RTL.
Yes, this Figma Direction component reflects the shadcn/ui Radix Direction setup. Your RTL designs in Figma will align with production when developers use DirectionProvider and useDirection from the shadcn/ui direction component.