Components
Switch
A toggle between an on and off state.
Usage
With @flagon-io/ui installed (see Installation), import it directly.
import { Switch, Label } from "@flagon-io/ui";
<div className="flex items-center gap-3">
<Switch id="2fa" />
<Label htmlFor="2fa">Require 2FA</Label>
</div>Prefer to own the code?
You don’t have to install the package - you can copy this component into your project with the shadcn CLI and edit it freely.
npx shadcn@latest add https://ui.flagon.io/r/switch.json