Install
Pull Page Header from the barrel for everyday use, or the granular path when you want a tighter bundle.
import { PageHeader } from "@brika/clay";import { PageHeader } from "@brika/clay/components/page-header";A minimal example
Drop this into a page. Native HTML attributes pass through to the underlying primitive.
import { Button } from '@brika/clay/components/button';
import {
PageHeader,
PageHeaderActions,
PageHeaderDescription,
PageHeaderInfo,
PageHeaderTitle,
} from '@brika/clay/components/page-header';
import { Plus } from 'lucide-react';
/** Standard page header with title, description, and a primary action. */
export default function PageHeaderDefaultDemo() {
return (
<PageHeader className="w-full max-w-2xl">
<PageHeaderInfo>
<PageHeaderTitle>Dashboards</PageHeaderTitle>
<PageHeaderDescription>Monitor your key metrics in one place.</PageHeaderDescription>
</PageHeaderInfo>
<PageHeaderActions>
<Button>
<Plus />
New dashboard
</Button>
</PageHeaderActions>
</PageHeader>
);
}Page Header, every way
Accessibility
-
PageHeaderTitlerenders as<h1>by default, ensure only one<h1>per page. - Action buttons should be descriptive: "New dashboard" not just "New".
- When used with a
Breadcrumb, the breadcrumb provides location context the heading cannot.
Theme tokens
Every CSS variable Page Header reads, with its default and the
dotted path you'd write in a ThemeConfig JSON
to override it. Set any of these in your theme to retune Page Header
without touching component code.
Page Header tokens
1 token--page-header-description-colorcolorvar(--muted-foreground)components.pageHeader.descriptionColorForeground color of `<PageHeaderDescription>` (and the inline `<PageHeaderCount>` chip). Defaults to the muted role so the description reads as secondary against the title.
Override in a theme
Authoring a theme is plain JSON. Drop overrides under
components.pageHeader, the names
are camelCase versions of the variable suffix.
{
"id": "my-theme",
"name": "My Theme",
"description": "...",
"accentSwatches": ["#000"],
"components": {
"pageHeader": {
"descriptionColor": "var(--muted-foreground)"
}
}
}
Then apply with applyTheme(myTheme)
(see the theming guide),
scope it to a subtree with themeToCssVars(myTheme, mode),
or consume any token directly in your own JSX with the matching Tailwind utility
(e.g. bg-page-header-…) — see the
chips on each token row.
API reference
Props specific to Page Header. Native HTML attributes pass through to the underlying primitive, see the component source on GitHub for the full type signature.
<PageHeader />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<PageHeaderActions />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<PageHeaderCount />
1 prop- number | stringNumber or label rendered in the count chip.
<PageHeaderDescription />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<PageHeaderInfo />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.
<PageHeaderTitle />
passthroughNo wrapper-specific props, all attributes pass through to the underlying primitive.