Page header
The block at the top of a page: a breadcrumb, the title, a description, a row of small facts, the page's actions and a tab list. It is layout only, and every part is optional. For the bar across the whole application use the navbar; for a framed block inside a page use the card.
Install
npx shadcn@latest add @thrum-pro/page-headerThis is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
PageHeader: separator | boolean | Default false | Draw a line under the header, 16 pixels below its last part. A PageHeaderTabs row sits on the line instead. |
PageHeader: className | string | – | Extra classes for the header element, merged last. |
PageHeader: ...props | ComponentProps<"header"> | – | Every other attribute of the header element. |
PageHeaderBreadcrumb | ComponentProps<"div"> | – | The slot above the title, for a breadcrumb or a back link. |
PageHeaderTitle: level | 1 | 2 | 3 | 4 | 5 | 6 | Default 1 | The heading level to render. 1 for the title of the page, lower for a section inside one. The look stays the same. |
PageHeaderTitle: ...props | heading props | – | Every other heading attribute. The title is 20 pixels in a narrow header and 24 in a wide one, and wraps. |
PageHeaderDescription | ComponentProps<"p"> | – | One or two sentences under the title, in the muted text colour. |
PageHeaderMeta | ComponentProps<"div"> | – | A wrapping row of small facts: a status, an owner, a date. |
PageHeaderActions | ComponentProps<"div"> | – | The page's buttons. Beside the title, right-aligned, when the header is at least 512 pixels wide; under the text, left-aligned and wrapping, when it is narrower. |
PageHeaderTabs | ComponentProps<"div"> | – | The slot along the bottom edge for a tab list. |
className | string | – | On every part: extra classes, merged last. |
Motion and sound
Motion
- The header does not move. Its layout follows its own width, not the screen's, and changes at once.
Sound
Silent. This component makes no sound.
Accessibility
- The root is a header element and the title is a real heading of the level you pass, so the page outline stays correct. Use level 1 once per page.
- It adds no other role and takes no keyboard input. The parts you put in it keep their own.
- The order in the markup is the reading order: breadcrumb, title, description, meta, actions, tabs. The wide layout only moves the actions visually, to the right of the title.
- A long title wraps instead of being cut, and nothing overflows at 160 pixels wide.
- Text uses the foreground and muted colours, which keep 4.5 to 1 against the page in both themes.
Source
The source comes with Pro
TypeScript source · Copy-paste ready · MIT-compatible for client projects · Includes all dependencies
Files and dependencies
- Adds
components/ui/page-header.tsx- Packages
- None
- Brings along
- Nothing
Changelog
- 1.0.0 · 2026-12-03First release.