Files
shadcn-ui/apps/www/content/docs/components/switch.mdx
2023-06-22 22:44:52 +04:00

39 lines
565 B
Plaintext

---
title: Switch
description: A control that allows the user to toggle between checked and not checked.
component: true
radix:
link: https://www.radix-ui.com/docs/primitives/components/switch
api: https://www.radix-ui.com/docs/primitives/components/switch#api-reference
---
<ComponentPreview name="switch-demo" />
## Installation
<Steps>
### Command
```bash
npx shadcn-ui add switch
```
### Usage
```tsx
import { Switch } from "@/components/ui/switch"
```
```tsx
<Switch />
```
</Steps>
## Examples
### Form
<ComponentPreview name="switch-form" />