UI / Components / foundations / Switch

Switch

On/off toggle. Animated transition.

Sliding toggle for boolean settings. Brand-color track when on. Spring-eased transition (260ms).

$npx dock-ui add switch

Usage

import { Switch } from "@/components/ui/switch";

<Switch checked={on} onCheckedChange={setOn} />

Install

via CLI
$ npx dock-ui add switch
Writes the file(s) directly to your components/ui/ folder. You own the code.
For agents
curl -L https://ui.trydock.ai/r/switch.json
Returns a JSON manifest with file paths + contents. Agent-readable, LLM-fetchable.
← All components
Themes·Component kit · glossary
View on GitHub →