Elements Switch
Back to Elements

Switch

0 components

UI elements you can copy into your project.

API reference

Generated from each primitive's $props() declaration.

Switch.Root

Toggle switch input with dark mode support.

Prop Type Default Description
ref bind: HTMLElement | null null
class as className string
checked bind: boolean false
...restProps Record<string, unknown> Remaining attributes, spread onto the underlying element.