---
title: Switch
description: A control that allows the user to toggle between checked and not checked.
source: apps/www/registry/default/ui/switch
primitive: https://www.reka-ui.com/docs/components/switch.html
---
## Installation
```bash
npx shadcn-vue@latest add switch
```
### Install the following dependency:
```bash
npm install reka-ui
```
### Copy and paste the following code into your project
<<< @/registry/default/ui/switch/Switch.vue
## Usage
```vue
```
# Add icon inside switch thumb
```vue
```
## Examples
### Form