Components
Direction
Direction provider for reading direction.
Use DirectionProvider to set the reading direction for RTL support.
OneTwoThree
import { useState } from 'react';
import { DirectionProvider, Button } from '@tile-ui/react';
export default function DirectionDemo() {
const [rtl, setRtl] = useState(false);
Registry install
pnpm dlx shadcn@latest add @tile-ui/directionPackage usage
import { DirectionProvider } from '@tile-ui/react';
<DirectionProvider dir="rtl">
<App />
</DirectionProvider>Highlights
- LTR and RTL
- Context-based
Registry dependencies
| Item | Purpose |
|---|---|
direction | Component source and module styles |
core | Framework-agnostic logic helpers |
styles | Shared SCSS tokens and globals |
API reference
DirectionProvider
| Prop | Type | Default |
|---|---|---|
dir | 'ltr' | 'rtl' | — |