Switch

Toggle switch control built on Radix Switch primitive with pill rounded-full track and animated sliding thumb handle.

// Radix — @radix-ui/react-switch
import { Switch } from "@shavin/ui";

Sizes

<Switch size="sm" checked={sm} onCheckedChange={setSm} />
<Switch size="md" checked={md} onCheckedChange={setMd} />

Disabled

<Switch size="md" checked disabled />
<Switch size="md" checked={false} disabled />

Props

PropTypeDefault
size"sm" | "md""md"
Configure Theme
Theme
Accent Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font