Docs
Switch
A control that allows the user to toggle between checked and not checked.
import * as React from "react"; import { Switch } from "@/components/ui/switch"; import { Stack } from "@/components/ui/stack"; export function SwitchExample(): React.JSX.Element { return ( <Stack alignItems="center" direction="row" gap={2}> <Switch /> <span>Label</span> </Stack> ); }
npx lotru@latest add ui/switch
import { Switch } from "@/components/ui/switch";
<Switch />
Previous
Slider
Next
Table
On this page