Components
Loading preview...
Choose between a set of options.
@shugar
npx shadcn@latest add https://21st.dev/r/shugar/switchimport { Switch } from "@/components/ui/switch";
export default function SizesDemo() {
return (
<div className="flex flex-col items-start gap-2 w-3/4">
<div className="flex items-center gap-4">
<Switch name="sizes-small" size="small">
<Switch.Control defaultChecked label="Source" value="source" />
<Switch.Control label="Output" value="output" />
</Switch>
<Switch name="sizes-default">
<Switch.Control defaultChecked label="Source" value="source" />
<Switch.Control label="Output" value="output" />
</Switch>
<Switch name="sizes-large" size="large">
<Switch.Control defaultChecked label="Source" value="source" />
<Switch.Control label="Output" value="output" />
</Switch>
</div>
</div>
);
}