Direction Provider
The Direction Provider component allows you to set the text direction (LTR or RTL) for Base UI components, enabling proper layout and behavior for right-to-left languages.Import
Usage
Wrap your application or specific component tree with theDirectionProvider to set the text direction:
Left-to-right (default)
The default direction isltr (left-to-right):
API Reference
Props
children
- Type:
React.ReactNode - Optional
direction
- Type:
'ltr' | 'rtl' - Default:
'ltr' - Optional
'rtl' for right-to-left languages like Arabic or Hebrew, and 'ltr' for left-to-right languages.