Toggle

Toggles switch between enabled and disabled states.

A toggle allows users to switch between two mutually exclusive states, such as on and off. The change takes effect immediately when the toggle is activated.

Use toggles for settings or preferences that control a persistent state. Toggles are best suited for actions that do not require confirmation and where the outcome is instantly visible or easily reversible.

  • Use clear, binary states; avoid ambiguous or multi-step outcomes.
  • Ensure the current state is visually obvious without relying on labels alone.
  • Apply toggles only for settings, not for one-time or destructive actions.
  • Avoid using toggles for navigation or form submission.

 

Storybook