Toggle
Actions

Toggle.

A smooth accessible pressed-state toggle for filters and options.

Real interactive component
Live demo

The preview uses the actual shared component, including your current theme, rounding, border and motion preferences.

Props & API reference

Parameters available in the shared component, including value types, requirements and accepted options.

5 props
ParameterTypeRequiredDefaultPossible valuesDescription
pressedbooleanNofalsetrue · falseControlled on/off pressed state.
onPressedChange(pressed: boolean) => voidNo——Called when the user toggles state.
childrenReactNodeYes——Icon, label, or both; centered in the control.
disabledbooleanNofalsetrue · falseDisable interaction.
classNamestringNo——Additional styling class.