Skip to main content

Forms

Switch

Render the shared immediate-toggle switch control. The digital equivalent of flipping a light switch.

Curated demo

Reference

Render the shared immediate-toggle switch control. The digital equivalent of flipping a light switch.

  • Use Switch for settings toggles that read as on/off.
  • Pair it with surrounding context that explains the effect. What exactly are we turning on here?

Props

Name Type Default Description
id * string Unique ID.
label * string Label for the switch.
disabled boolean false Whether the switch is disabled.
checked boolean false Whether the switch is checked.
class string Additional CSS classes.

Example snippet

<Switch id="announcements" label="Enable announcements" />