# StatCard

One number with its name, its change and its source.

Group: Data. Code: `components/software/stat-card.tsx`. From the old system: StatCard in @id-identity-as/ui/data. Live: https://design.id-hub.dk/software/stat-card

```tsx
import { StatCard } from '@/components/software/stat-card';

<StatCard label="Åbne ordrer" value="12" delta="+3" deltaDirection="up" deltaBasis="i forhold til sidste uge" source="Eksempeldata" />
```

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| label (required) | `string` |  | What is measured. |
| value (required) | `string` |  | The number, already formatted: "1.240" or "68 %". Never computed in the card. |
| delta | `string` |  | The change, already formatted. |
| deltaDirection | `'up' \| 'down'` |  | Draws an arrow beside the change. The direction is not a verdict. |
| deltaBasis | `string` |  | What the change is measured against. |
| source | `string` |  | Where the number comes from and what period it covers. |

Do:
- Format the number the Danish way before it comes in: 1.234,56.
- Say in words whether a change is good. Returns going down is an arrow down that is good.
- Name the source, and mark example data as example data.

Do not:
- Do not colour the change green or red.
- Do not animate the number.
- Do not invent a figure to fill a tile.

Accessibility:
- A section named by its label.
- The arrow is decorative; the change is text.

Tokens it uses:
- color.surface.base
- color.border.default
- color.text.muted
- radius.sm
- type.display.sm
- type.heading.sm
- type.body.sm
- space.inline.1
- space.inline.2
- 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.
