PureKit UI logoPureKit UI

Switch

Toggle switch component for boolean values.

Basic

Simple switch

Sizes

Different sizes

Label Position

Label placement options

Main Props

NameTypeDefaultDescription
id
string-HTML id attribute
checked
boolean-Checked state
onCheckedChange
(checked: boolean) => void-Change handler
disabled
booleanfalseDisable the switch
size
'sm' | 'md' | 'lg''md'Switch size
label
string-Label text
labelPosition
'left' | 'right''left'Position of the label

Class Props

NameTypeDefaultDescription
className
string-Class for wrapper
classNameLabel
string-Class for label
classNameSwitch
string-Class for switch button