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

49 lines
771 B
Plaintext

---
title: Checkbox
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/checkbox
api: https://www.radix-ui.com/docs/primitives/components/checkbox#api-reference
---
<ComponentPreview name="checkbox-demo" />
## Installation
<Steps>
### Command
```bash
npx shadcn-ui add checkbox
```
### Usage
```tsx
import { Checkbox } from "@/components/ui/checkbox"
```
```tsx
<Checkbox />
```
</Steps>
## Examples
### With text
<ComponentPreview name="checkbox-with-text" />
### Disabled
<ComponentPreview name="checkbox-with-disabled" />
### Form
<ComponentPreview name="checkbox-form-single" />
<ComponentPreview name="checkbox-form-multiple" />