# Basic

> Single checkbox with a label.

A shadcn/ui block from the [@flx](https://ui.flexnative.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/flx/checkbox-01).

- Page, with a live preview: https://shadcn.exchange/r/flx/checkbox-01
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/flx/checkbox-01-light-461825943dfd6bea.png
- Registry item: https://ui.flexnative.com/r/checkbox-01.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.flexnative.com/r/checkbox-01.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `checkbox`, `label`

## Files

### `registry/patterns/checkbox/checkbox-01.tsx`

```tsx
import { Checkbox } from '@/components/ui/checkbox'
import { Label } from '@/components/ui/label'

export function Checkbox01() {
  return (
    <div className="flex items-center gap-3">
      <Checkbox id="checkbox-01-terms" defaultChecked />
      <Label htmlFor="checkbox-01-terms">Accept terms and conditions</Label>
    </div>
  )
}
```
