Switch between on & off states, and group them with single or multiple selection, built on Base UI.
View as MarkdownInstallation
Component API
| Prop | Type | Default | Description |
|---|---|---|---|
icon | ReactNode | - | Shown while not pressed. |
| Shown while not pressed. | |||
pressedIcon | ReactNode | - | Shown while pressed. |
| Shown while pressed. | |||
label | string | - | |
defaultPressed | boolean | false | |
pressed | boolean | - | Controlled state. |
| Controlled state. | |||
onPressedChange | (pressed: boolean) => void | - | |
value | string | - | |
aria-label | string | - | |
size | sm | md | md | The button's footprint. |
| The button's footprint. | |||
shape | none | rounded | pill | rounded | |
disabled | boolean | false | |
animated | boolean | true | |
className | string | - | |
focus | boolean | string | true | |