Toggle a setting on or off
Switches represent a binary state — enabled or disabled, on or off — and apply the change immediately without requiring a submit action.
Switch component is used to toggle an on-off or yes-no action.
Switches represent a binary state — enabled or disabled, on or off — and apply the change immediately without requiring a submit action.
Unlike a checkbox in a form, a switch takes effect the moment it's toggled — use it when the action should happen right away.
The switch's visual position and colour make the current state obvious without needing to read a label.
Switch track
Thumb
Label
The switch is a toggle control that visually reflects its on or off state and applies the change immediately.
Renders a switch in its active state. Use when a setting should take effect immediately without a separate save action — such as enabling notifications or toggling a feature.
Component tokens are specific to each component. Use the table title as the prefix: border-color-transparent under sgds/switch means sgds/switch/border-color-transparent.
sgds/border-color-transparentsgds/font-size/14sgds/font-size/20sgds/form/border-radius/fullsgds/form/border-width/defaultsgds/form/gap/lgsgds/form/height/2-xssgds/form/height/lgsgds/form/height/mdsgds/form/height/smsgds/form/padding-inline/smsgds/form/primary/surface/defaultsgds/form/primary/surface/emphasissgds/form/surface/emphasissgds/form/surface/subtlesgds/form/width/2-xssgds/form/width/3-xlsgds/form/width/mdUse clear labels, predictable values, and a single obvious action for the control.
Too many repeated controls or unclear prompts make form completion slower and less confident.
TabShift+TabEnterSpaceShare them with us on
Report it on GitHub
The Singapore Government Design System was developed to empower teams in creating fast, accessible and mobile-friendly digital services.