# Card

A surface with a hairline border that knows nothing about what is in it.

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

```tsx
import { Card, CardHeader } from '@/components/software/card';

<Card>
  <CardHeader eyebrow="Ordre 41028" title="Afventer godkendelse" hint="Oprettet 28. august af Mette N." />
  <Text>2 linjer</Text>
</Card>
```

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| as | `ElementType` | `'section'` | The element to render. A card names a region of the page. |
| padding | `'md' \| 'lg'` | `'md'` | Md is 20 px of padding, lg is 40 px. |

Do:
- Let the border do the work. A page of bordered panels reads as order.
- Give a card a CardHeader when it is a region of its own.

Do not:
- Do not add a shadow. There is none in the system.
- Do not nest a card in a card. Use a hairline or a Stack inside.
- Do not put a packshot in a card: packshots sit on Snow, in a ProductCard.

Accessibility:
- As a section it should be named: give it a CardHeader, or an aria-label through as and your own element.

Tokens it uses:
- color.surface.base
- color.border.default
- color.text.default
- radius.sm
- space.inline.5
- 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.
