Toggle
A two-state button that can be switched on or off. Built on Radix UI Toggle.
Installation
Props
| Prop | Type | Default | Description |
|---|---|---|---|
pressed | boolean | — | Controlled pressed state. |
onPressedChange | (pressed: boolean) => void | — | Callback when pressed state changes. |
defaultPressed | boolean | false | Uncontrolled default pressed state. |
variant | "default" | "outline" | "default" | Visual style. |
size | "default" | "sm" | "lg" | "default" | Size. |
disabled | boolean | false | Prevents interaction. |