# QuantityStepper

A number chosen with minus and plus, around a real number field.

Group: Forms. Code: `components/software/quantity-stepper.tsx`. From the old system: QuantityStepper in @id-identity-as/ui/buy. Live: https://design.id-hub.dk/software/quantity-stepper

```tsx
import { QuantityStepper } from '@/components/software/quantity-stepper';

<QuantityStepper label="Antal" name="quantity" min={10} step={10} defaultValue={20} helper="Sælges i kolli a 10." />
```

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| label (required) | `string` |  | What is counted. |
| name (required) | `string` |  | The form field name. The value posts like any other field. |
| min | `number` | `0` | The lowest number. |
| max | `number` |  | The highest number. |
| step | `number` | `1` | How much one press changes the number. |
| defaultValue | `number` |  | The number from the start. Without it, min. |
| helper | `string` |  | A line under the field. |
| onChange | `(value: number) => void` |  | Called with the new number. |
| labels | `Partial<QuantityStepperLabels>` |  | { decrease, increase }, read aloud for the two buttons. Danish by default. |

Do:
- Use it for small counts that are nudged up and down.
- Say the rule in the helper: the minimum, the pack size.

Do not:
- Do not use it for a number that is typed once, such as a year or a CVR number. That is Input.
- Do not put it in the same row as the solid Button.

Accessibility:
- The field is a native number input with a real label, so 48 can be typed.
- The two buttons are named by labels, and without script the field still works.

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
- space.section.1
- space.section.2

---

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.
