Switch
On/off toggle for a setting that applies immediately.
import { Switch } from "@ps1ui/core";States
<Switch aria-label="Off" />
<Switch aria-label="On" defaultChecked />
<Switch aria-label="Disabled" disabled />
<Switch aria-label="Disabled on" disabled defaultChecked />With a label
<Stack direction="row" gap="sm" align="center">
<Switch id="notifications" defaultChecked />
<Label htmlFor="notifications">Enable notifications</Label>
</Stack>Props
All native <input> attributes are also accepted except type, role.