Skip to content

Switch

A toggle control for switching between checked and unchecked states.

---
import { Label } from '@bejamas/ui/components/label';
import { Switch } from '@bejamas/ui/components/switch';
---
<div class="flex items-center gap-3">
<Switch id="notifications" />
<Label for="notifications">Enable notifications</Label>
</div>
Terminal window
bunx bejamas add switch
---
import { Switch } from '@bejamas/ui/components/switch';
import { Label } from '@bejamas/ui/components/label';
---
<div class="flex items-center gap-3">
<Switch id="notifications" />
<Label for="notifications">Enable notifications</Label>
</div>