# BarList

A ranked list with a bar behind each number. Layout, not a chart.

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

```tsx
import { BarList } from '@/components/software/bar-list';

<BarList
  title="Mest bestilte"
  note="Eksempeldata, antal stk."
  rows={[
    { label: 'Række A', value: 1425, text: '1.425' },
    { label: 'Række B', value: 980, text: '980' },
  ]}
/>
```

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| title (required) | `string` |  | What is compared. |
| note | `string` |  | The period and the unit. |
| rows (required) | `BarListRow[]` |  | { label, value, text }. value draws the bar; text is the number as shown, already formatted. |

Do:
- Keep the order of the rows fixed when the data updates.
- Write the unit in the note.

Do not:
- Do not give the bars different colours. One colour, the text colour.
- Do not animate the bars.
- Do not use it where an axis or a time line is needed. Charts are not in the system yet: ask first.

Accessibility:
- Every value is text beside its bar; the bar itself is hidden from screen readers.

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