Toggle
A button that stays pressed to switch an option on or off.
API Reference
The Toggle component is a wrapper around the button element with aria-pressed.
| Prop | Type | Default |
|---|---|---|
pressed | boolean | false |
onPressedChange | (pressed: boolean) => void | — |
variant | "outline""ghost" | "outline" |
size | "md""sm" | "md" |
icon | ReactNode | — |
iconOnly | boolean | false |
disabled | boolean | false |
