Toggle
A two-state button that can be toggled on or off.
Import
Usage
Toggle Props
| Attribute | Type | Default | Description |
|---|---|---|---|
| pressed | boolean | - | The controlled pressed state of the toggle. |
| defaultPressed | boolean | - | The default pressed state (uncontrolled). |
| onPressedChange | (pressed: boolean) => void | - | Callback when the pressed state changes. |
| variant | 'default' | 'outline' | 'default' | The visual style of the toggle. |
| size | 'default' | 'sm' | 'lg' | 'default' | The size of the toggle. |
| disabled | boolean | false | Whether the toggle is disabled. |
| className | string | - | Additional CSS classes for styling. |

