Direction

Sets left-to-right or right-to-left for the Base UI parts inside.

Installation

pnpm dlx shadcn@latest add @cupertinoui/direction

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { DirectionProvider } from "@/components/ui/direction"

<DirectionProvider direction="rtl">…</DirectionProvider>

API Reference

Every part forwards the props of the underlying Base UI Direction Provider part. The props below are the ones CupertinoUI adds or changes.

DirectionProvider

PropTypeDescription
direction"ltr" | "rtl"
Default: "ltr"
The reading direction.
classNamestringExtra classes, merged with the component's own.