Components
Switch

Switch

The Switch is an interactive, binary component designed for your applications. It offers a clear, visual interface for users to enable or disable specific settings, features, or functionalities.

API Reference

Root

PropTypeDefault
asChild
boolean
checked
boolean
defaultChecked
boolean
dir
'ltr' | 'rtl'
"ltr"
disabled
boolean
form
string
getRootNode
() => ShadowRoot | Node | Document
id
string
ids
Partial<{ root: string input: string control: string label: string thumb: string }>
invalid
boolean
label
string
name
string
onCheckedChange
(details: CheckedChangeDetails) => void
readOnly
boolean
required
boolean
value
string | number
"on"

Label

PropTypeDefault
asChild
boolean

Thumb

PropTypeDefault
asChild
boolean

Control

PropTypeDefault
asChild
boolean