Internal ID software / Surfaces
CardHeader
The top of a card: what it is, and at most one thing to do with it.
Not drawn in Figma: built only from the tokens, for internal ID software. In code: components/software/card.tsx. From the old system: CardHeader in @id-identity-as/ui.
Example
import { Card, CardHeader } from '@/components/software/card';
<CardHeader title="Brugere" hint="12 aktive" action={<Link variant="block" href="/brugere">Se alle</Link>} />Props
| Prop | Type | Default | What it does |
|---|---|---|---|
title (required) | string | The name of what the card holds. | |
level | 2 | 3 | 4 | 3 | The heading level of the title in the outline of the page. |
eyebrow | string | A short line above the title, such as "Ordre 41028". | |
hint | string | A short line under the title, such as who and when. | |
action | ReactNode | One control at the end of the header, such as a link or a button. |
Do
- Keep the title to a few words. Heading names things.
- Set level so the title fits the outline around the card.
Do not
- Do not put two actions in the header. The second belongs in the card.
- Do not write the eyebrow in capitals.
Accessibility
- The title is a real heading, so the card lands in the outline of the page.
Tokens it uses
- type.heading.md
- type.body.sm
- color.software.muted
- space.inline.1
- space.inline.3
- space.inline.4