
Premium solid toggle group with exclusive or multi-select state.
npx shadcn@latest add https://ui.edbn.me/api/analytics/registry/toggle-group.jsonGroups toggle buttons where one or more can be activated. Renders a div element.
defaultValueany[][]Initially active values
valueany[]Controlled active values
onValueChangefunctionCalled when value changes
toggleMultiplebooleanfalseAllow multiple active
disabledbooleanfalseDisable group
loopFocusbooleantrueLoop keyboard focus
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
A toggle button within the group. Renders a button element.
valueanyRequiredToggle value
disabledbooleanfalseDisable toggle
nativeButtonbooleantrueRender as native button
classNamestring | functionCSS class name
renderReactElement | functionCustom render function
| Attribute | Description |
|---|---|
| data-pressed | Present when toggle is active |
| data-disabled | Present when toggle is disabled |