Switch
A control that toggles between checked and unchecked. Built on Base UI's switch primitive.
Last updated January 1, 1980
CreditsModifiedPublished
Copied from shadcn/ui.
- The thumb slides toward the reading-end (mirrored in RTL) instead of always sliding right
Overview
Installation
Usage
import { Switch } from "@/components/ui/switch"
export function Example() {
return <Switch />
}Examples
Size
Use size="sm" for a smaller switch.