GitHub

Switch

A control that allows the user to toggle between checked and not checked.

Installation#

Usage#

import {
Switch,
SwitchControl,
SwitchLabel,
SwitchThumb,
} from "~/components/ui/switch";
<Switch class="flex items-center space-x-2">
<SwitchControl>
<SwitchThumb />
</SwitchControl>
<SwitchLabel>Airplane Mode</SwitchLabel>
</Switch>