Skip to content
PanelUI KitCompany design system
0.3.0-alpha.3
ComponentsForms

Switch

Experimental

Turn an immediate binary preference on or off.

panel-ui-kit/switch
Example

Tab to explore focus and keyboard behavior.

example.tsx
'use client'; import 'panel-ui-kit/styles.css';import { PanelUiTheme } from 'panel-ui-kit/theme';import { Switch } from 'panel-ui-kit/switch';import { Label } from 'panel-ui-kit/label'; export function Example() {  return (    <PanelUiTheme theme="neutral" motion={{"mode":"full","durationScale":1,"intensity":1}}>      <div style={{ display: "flex", alignItems: "center", gap: 12 }}>        <Switch id="email-updates" name="email-updates" />        <Label htmlFor="email-updates">Email updates</Label>      </div>    </PanelUiTheme>  );}

When to use

Use a clear label. Applications own persistence. Use Checkbox for a form selection or consent.

Keyboard

Space and Enter toggle. Disabled switches are skipped.

Properties

PropertyValuesDefault
checked / defaultCheckedbooleanfalse
onCheckedChangeboolean callback—
motionfull · reduced · off · objectInherited
Panel UI KitShared components. Product identity.