Early-bird pricing is open: 50 of 50 licenses still available. See pricing

Skip to content
popcons

Switch

On/off toggle with a visible label.

Install this component

Install command hidden until you are signed in with a license.

Live demo

Email notifications

Currently on.

Props

Switch props
PropTypeDescription
labelstringVisible label (required).
checkedbooleanControlled value.
defaultCheckedbooleandefault falseInitial value when uncontrolled.
onCheckedChange(checked: boolean) => voidChange callback.

Accessibility

Keyboard

  • Space / EnterToggle

ARIA and semantics

  • Button with role=switch and aria-checked
  • aria-labelledby points to the visible label

Source

Copy the files into your project. Or install with the commands above (they unlock with your license).

The full Switch source is part of the license.

The live demo is free to try. A license unlocks copy-paste source, installs and exports for every component and pack.

Unlock every icon

More from Core components