Primitive · CLI
Toggle
Soft-rect two-state button with pressed fill morph on Base UI.
Preview
npx shadcn@latest add @atroui/toggleInstallation
Agent blurb — install command + no npm UI rule. For agents
npx shadcn@latest add @atroui/toggleSource lands in your repo. Installation · Registry
Usage
Pressed fill morphs in ≤160ms. Inside ToggleGroup, single-select peers share a layoutId pill.
tsx
import { Toggle } from "@/components/ui/toggle"
<Toggle aria-label="Bold" defaultPressed>
Bold
</Toggle>Try it
Flip variant, size, and disabled with knobs.
variantsize
Toggle