# Shadcn Switch Components

A control that allows the user to toggle between on and off. Every switch variant toggles reliably with Radix UI and Base UI semantics.

- Page: https://shadcnuikit.com/components/switch
- Variants: 10 (10 free, 0 pro)
- Built with shadcn/ui, Tailwind CSS v4, React and Next.js

- [Variant 1](https://shadcnuikit.com/components/switch/1) (Free, install: `npx shadcn@latest add @shadcnuikit/switch1`)
- [Variant 2](https://shadcnuikit.com/components/switch/2) (Free, install: `npx shadcn@latest add @shadcnuikit/switch2`)
- [Variant 3](https://shadcnuikit.com/components/switch/3) (Free, install: `npx shadcn@latest add @shadcnuikit/switch3`)
- [Variant 4](https://shadcnuikit.com/components/switch/4) (Free, install: `npx shadcn@latest add @shadcnuikit/switch4`)
- [Variant 5](https://shadcnuikit.com/components/switch/5) (Free, install: `npx shadcn@latest add @shadcnuikit/switch5`)
- [Variant 6](https://shadcnuikit.com/components/switch/6) (Free, install: `npx shadcn@latest add @shadcnuikit/switch6`)
- [Variant 7](https://shadcnuikit.com/components/switch/7) (Free, install: `npx shadcn@latest add @shadcnuikit/switch7`)
- [Variant 8](https://shadcnuikit.com/components/switch/8) (Free, install: `npx shadcn@latest add @shadcnuikit/switch8`)
- [Variant 9](https://shadcnuikit.com/components/switch/9) (Free, install: `npx shadcn@latest add @shadcnuikit/switch9`)
- [Variant 10](https://shadcnuikit.com/components/switch/10) (Free, install: `npx shadcn@latest add @shadcnuikit/switch10`)

## Install with the shadcn CLI

Add the registry to components.json once:

```json
"registries": {
  "@shadcnuikit": {
    "url": "https://shadcnuikit.com/r/{name}.json",
    "headers": {
      "Authorization": "Bearer ${REGISTRY_TOKEN}"
    }
  }
}
```

Then install any item by its registry name, for example `npx shadcn@latest add @shadcnuikit/hero1`. Free items install without an API key. Pro items need a license and an API key from https://shadcnuikit.com/account/api-keys, set as REGISTRY_TOKEN in your .env file.

More from Shadcn UI Kit: [llms.txt](https://shadcnuikit.com/llms.txt)