# Pagination

Moving through a long list, as a list of links.

Group: Navigation. Code: `components/software/pagination.tsx`. From the old system: Pagination in @id-identity-as/ui/commerce. Live: https://design.id-hub.dk/software/pagination

```tsx
import { Pagination } from '@/components/software/pagination';

<Pagination page={3} pageCount={12} href={(page) => `/ordrer?side=${page}`} />
```

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| page (required) | `number` |  | The page shown now, from 1. |
| pageCount (required) | `number` |  | How many pages there are. With one page nothing is rendered. |
| href (required) | `(page: number) => string` |  | The address of a page. Every page is a real link. |
| labels | `Partial<PaginationLabels>` |  | { nav, previous, next, page }. Danish by default. Pass translations here. |
| as | `ElementType` | `'a'` | The element to render a link with, such as the link of the framework. |

Do:
- Keep the page in the address, so back, bookmarks and shared links work.
- Say above the list what is shown: "Viser 49 til 72 af 270".

Do not:
- Do not build it from buttons with state. A page is a place, so it is a link.
- Do not replace it with an endless "Vis flere". Everything past the first page is then out of reach.

Accessibility:
- A named navigation. The current page has aria-current and is not a link.
- At the first and the last page the edge is plain text, not a disabled button.

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