# Select

One choice from a list, as the native select.

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

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

<Select
  label="Afdeling"
  name="department"
  autoComplete="off"
  required
  placeholder="Vælg en afdeling"
  options={[{ value: 'salg', label: 'Salg' }, { value: 'lager', label: 'Lager' }]}
/>
```

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| label (required) | `string` |  | The visible label. Never a placeholder. |
| name (required) | `string` |  | The form field name. |
| autoComplete (required) | `AutoCompleteToken` |  | An HTML autocomplete token such as "email" or "organization", or "off" as the explicit refusal. |
| helper | `string` |  | Guidance shown under the field when there is no error. |
| error | `string` |  | What to do about a problem. Its presence puts the field in its error state. |
| required | `boolean` |  | Required fields carry no mark. The optional ones are marked. |
| optionalLabel | `string` | `'(valgfrit)'` | The mark on an optional field. Pass a translation here. |
| options (required) | `SelectOption[]` |  | { value, label, disabled? }. |
| placeholder | `string` |  | The empty first option, such as "Vælg en afdeling". |
| ...select | `SelectHTMLAttributes` |  | Everything a native select takes. |

Do:
- Give it a placeholder, so nobody has chosen without choosing.
- Use it from about six options. For fewer, a RadioGroup shows them all.

Do not:
- Do not build a custom list box. The native select works with a keyboard, a phone and a form post.
- Do not use it for navigation.

Accessibility:
- A native select with a real label.
- The chevron is decorative and hidden from screen readers.

Tokens it uses:
- color.surface.base
- color.text.default
- color.neutral.500
- color.text.muted
- radius.sm
- type.body.md
- type.body.sm
- type.heading.sm
- space.inline.2
- component.field.padding-top
- component.field.padding-bottom
- component.field.padding-x
- space.inline.3
- space.section.1

---

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.
