Toggle Button
Live preview and documentation for the Toggle Button component.
Preview
componentPreview.loading
About
A button with an on/off state (selected), used for filters, formatting, or persistent settings. For an isolated binary setting, use KasySwitch; for a momentary action, use KasyButton.
labeland/oricon: the button's content (at least one of the two is required);prefixIcon/suffixIconpair withlabel.selected/onChanged: current state and callback; passingonChanged: nulldisables the button.variant:filled(neutral fill at rest, default) orghost(transparent at rest, fills only on hover/selected).size:sm(32),md(36, default), orlg(40) height.borderRadius: overrides the default pill shape — used internally byKasyToggleButtonGroupfor straight-edged cells.semanticLabel: alternative accessibility label tolabel.
Selected uses a soft fill of the primary color (primarySoft); disabled drops to 50% opacity.
Last updated on 08/23/2026

