# Checkbox

One checkbox: a consent, a preference, a setting.

Group: Forms. Code: `components/software/form.tsx`. From the old system: Checkbox in @id-identity-as/ui/form. Live: https://design.id-hub.dk/software/checkbox

```tsx
import { Checkbox } from '@/components/software/form';

<Checkbox name="terms" required label="Jeg accepterer, at priserne er ekskl. moms" />
```

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| name (required) | `string` |  | The form field name. |
| label (required) | `ReactNode` |  | Written as a sentence the reader agrees to, not as a field name. |
| helper | `string` |  | Guidance under the checkbox. |
| error | `string` |  | What to do about a problem. |
| required | `boolean` |  | The box must be ticked before the form posts. |
| ...input | `InputHTMLAttributes` |  | Everything a native checkbox takes: defaultChecked, onChange, value. |

Do:
- Write the label as a full sentence.
- For several options under one question, use a fieldset with a legend around the checkboxes.

Do not:
- Do not tick a consent in advance.
- Do not use a checkbox for a choice between two named things. That is a RadioGroup.

Accessibility:
- A native checkbox; the label is part of the click target.
- It is ticked in the text colour, never in Flare.

Tokens it uses:
- color.text.default
- color.text.muted
- type.body.md
- type.body.sm
- type.heading.sm
- space.inline.1
- space.inline.3
- space.inline.5

---

Not drawn in Figma. Kasper decided on 20 November 2026 that internal software gets this set now, built only from the tokens. The look is ours until Peter draws it, and every open choice is a question in docs/SPOERGSMAAL-TIL-PETER.md. The public site, campaigns and brand surfaces use only the components drawn in Figma.

The rules for this set and all 33 components: https://design.id-hub.dk/software.md. Token values: https://design.id-hub.dk/tokens.md.

Index of everything, as text: https://design.id-hub.dk/llms.txt. Never invent a colour, a size, a component or a product fact: if it is not here, it does not exist yet.
