Components/Switch
Switch
A control for turning a single setting on or off.
Base UI
Interactive example
Installation
Run the CLI from your project root. Dependencies and component source are added automatically.
$npx quackelements add switchUsage
The generated file lives in your repository, so the component API and styles remain fully editable.
example.tsx
import { Switch } from "@/components/quack/switch"
export function SwitchDemo() {
return (
<label className="flex items-center justify-between gap-8">
<span>Product updates</span>
<Switch defaultChecked />
</label>
)
}