Switch

Below is a sliding switch button component

Switch

OFF

Installation

$ pnpm dlx shadcn@latest add https://pulseui-henna.vercel.app/registry/Switch.json

Props

PropTypeisCompulsoryDescription
onOnOff
(val: boolean) => void
true

handles the on/off state of the button

defaultValue
boolean
false

sets the default on or off state

Usage