Skip to main content

AmbientSwitch

AmbientSwitch is a circular switch button with optional LED indicator.

Interactive preview

Power
Record
Small
Large

Props

PropTypeDefaultNotes
checkedboolean-Controlled state.
defaultCheckedbooleanfalseUncontrolled initial state.
onCheckedChange(checked: boolean) => void-Called when toggled.
size"sm" | "md" | "lg""md"Switch size variant.
labelstring-Optional visible label.
ledboolean | string-true for default green, string for custom color.

Also accepts standard button props (except native onChange).

Examples

Uncontrolled

<AmbientSwitch label="Power" defaultChecked />

Controlled

const [enabled, setEnabled] = useState(false);

<AmbientSwitch checked={enabled} onCheckedChange={setEnabled} label="Bypass" />

Custom LED color

<AmbientSwitch label="Record" led="#ef4444" defaultChecked />