GitHub
Docs
Switch

Switch

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

Loading...
Loading...

Installation

pnpm dlx shadcn-ng@latest add switch
npx shadcn-ng@latest add switch
npx shadcn-ng@latest add switch
bunx --bun shadcn-ng@latest add switch

Copy and paste the following code into your project.

Update the import paths to match your project setup.

Usage

import { SwitchDirective } from '~/components/ui/switch.directive'
<button ubSwitch />