1. Docs
  2. Components
  3. Switch

Switch

A control that allows the user to toggle between on and off.

Installation

Anatomy

Examples

Group

Form

Component switch-form not found in registry.

API Reference

Switch.Root

PropTypeDefault
isSelected
boolean
defaultSelected
boolean
onChange
function
isDisabled
boolean
isReadOnly
boolean
name
string
value
string
children
ReactNode

Switch.Track

PropTypeDefault
className
string

Switch.Thumb

PropTypeDefault
className
string