Switch
- from @karaui
- by kara <ztzyrant@gmail.com>
An on/off control exposed as role="switch": a heavy spring carries the thumb across, it squashes a little while held, it shakes if pressed while disabled, and on coarse pointers the hit area grows to 44px. Label text is optional.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @karaui/switchLive preview
No live preview has been built for this component yet.
Registry dependencies0
The CLI adds no other registry items with this one.
