- Components
- Forms
Toggle
A pill button that stays pressed.
Installation#
npx shadcn add @ortaui/toggleExamples#
Variants#
Sizes and states#
API reference#
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "outline" | "default" | Pressed fills with the hover tone, or inverts for outline. |
| size | "sm" | "md" | "icon" | "md" | Same heights as Button. |
| pressed / defaultPressed | boolean | - | Controlled or uncontrolled state. |
| onPressedChange | (pressed: boolean) => void | - | Called when toggled. |