pnpm dlx shadcn@latest add https://ui.saturation.io/r/toggle.jsonTailwind v4 — Source Scanning
Saturation UI copies component source into your project via the shadcn registry (no npm package). If Tailwind v4 isn't scanning your components directory, add this to your CSS entry file:
@source "../components";This ensures all utility classes in CVA variants and data attribute selectors are included in your build.
import { Toggle } from "@/components/ui/toggle"<Toggle>Toggle</Toggle>| Prop | Type | Default | Description |
|---|---|---|---|
pressed | boolean | — | The controlled pressed state. |
defaultPressed | boolean | — | The default pressed state. |
onPressedChange | (pressed: boolean) => void | — | Event handler for state changes. |
variant | "default" | "outline" | "default" | The visual variant. |
size | "default" | "sm" | "lg" | "default" | The size of the toggle. |