# Checkbox

> An on/off choice, with a mixed state for "select all".

- **Level**: atom · **Status**: stable · **Role**: input
- **Import**: `import { Checkbox } from "@rrios-forge/ui/atoms/checkbox";`
- **Source**: `packages/ui/src/atoms/checkbox`

Tri-state form control. Composes `@radix-ui/react-checkbox` for the ARIA contract (`role="checkbox"`, `aria-checked` including the `mixed` value when indeterminate). Pair with a Label via `htmlFor` → `id`.

## Use it for

- Binary toggle / checkbox / radio group → `Switch` (in `SettingsField` with label) / `Checkbox` / `ChoiceGroup` with `Radio`

## Axes

| Axis | Part | Values | Default | Meaning |
|---|---|---|---|---|
| `size` | — | `sm` `md` `lg` | `md` | Ergonomic scale, in three families (control, text, container). |
| `invalid` | — | `true` `false` | `false` | Fails validation: a danger edge, announced as invalid; pair it with an error message. |

## Stories

- [Playground](/?path=/story/components-atoms-checkbox--playground) · frame: `/iframe.html?id=components-atoms-checkbox--playground&viewMode=story`
- [Sizes](/?path=/story/components-atoms-checkbox--sizes) · frame: `/iframe.html?id=components-atoms-checkbox--sizes&viewMode=story`
- [States](/?path=/story/components-atoms-checkbox--states) · frame: `/iframe.html?id=components-atoms-checkbox--states&viewMode=story`
- [With label](/?path=/story/components-atoms-checkbox--with-label) · frame: `/iframe.html?id=components-atoms-checkbox--with-label&viewMode=story`

## Always

- Tokens only (R04); variants are semantic axes, never appearance (R02).
- Typography and actions are Poesía atoms, never raw HTML with utilities.
- Vibrant panes need a ground and never nest (ADR-027).
