Molecules · Panel header
Panel header
The header bar of a dense panel: an optional numbered tag in the accent, a tracked uppercase title in the display font, and a quiet readout at the right in the data font.
- Best for
- Heading a panel in a dense, data-heavy screen where several panels sit side by side and are referred to by number.
- Not for
- A page title: use PageHeader. A card’s own title: use CardHeader.
This page as Markdown, a plain-text copy for a coding agent (an AI tool that writes code).
Examples
Numbered, with a readout
01
Open orders
42 open02
Shipments
updated 12:04Code
tsx
<div className="flex w-full max-w-md flex-col gap-4"> <PanelHeader index={1} title="Open orders" meta="42 open" /> <PanelHeader index={2} title="Shipments" meta="updated 12:04" /></div>Title only, at level 3
Warehouse stock
Code
tsx
<div className="w-full max-w-md"> <PanelHeader title="Warehouse stock" level={3} /></div>Anatomy
| Part | What it is |
|---|---|
| Index tag | Optional. The panel number on accent.signal.fill in accent.signal.ink (the primary Button’s gated pair). A number is padded to two digits. |
| Title | A real heading (h2 by default): Oxanium, 14px, uppercase, tracked. It truncates before it pushes the readout out. |
| Readout | Optional. Counts, a time or an id in the data font, text.secondary. |
Props
- titleReactNode
- Required. The panel’s title.
- indexnumber | string
- The panel number shown in the tag. A number is padded to two digits ("01").
- metaReactNode
- The right-aligned readout: "42 notes", "12:04".
- level2 | 3 | 4 | 5 | 6Default 2
- The heading level of the title. Pick it from the page outline, not from the size.
- classNamestring
- Merged with the component's classes.
- refRef<HTMLDivElement>
- Passed through to the root div.
- ...restOmit<HTMLAttributes<HTMLDivElement>, 'title'>
- Every native div attribute except title.
Keyboard
You can't reach this component with the keyboard. It has no keyboard behaviour of its own.
Do and don't
Do
- Number panels only when the numbers are stable and people refer to them.
- Keep the readout to one short value.
Don't
- Don’t use the index tag as a status: it is always the accent, and it is the panel’s name.
- Don’t skip heading levels to get a smaller title.