Direction
Radix direction context for RTL-aware components.
Direction (RTL)
This paragraph flows right-to-left. Wrap subtrees that need explicit direction with DirectionProvider.
Installation
1pnpm dlx shadcn@latest add @glasswave/directionUsage
1import { DirectionProvider, useDirection } from "glasswave";2 3<DirectionProvider dir="rtl">4 {children}5</DirectionProvider>useDirection(localDir?) returns the effective dir ("ltr" | "rtl"). Pair with dir on HTML elements for plain text/layout when Radix primitives are not involved.
API Reference
See the Radix UI Direction documentation.