easeUI
1

Switch

On and off switch with a quick slide and no bounce. Inside a label, the whole row is the tap target.

Installation

$ bunx --bun shadcn add @easeui/switch

API reference

PropTypeDefaultDescription
checked?boolean-Controlled on state.
defaultChecked?booleanfalseStarting state when uncontrolled. Default false.
onCheckedChange?((checked: boolean) => void)-Called with the next state each time the switch is toggled.
size?"sm" | "md"mdTrack size. Default "md".
className?string--

Updated