Agentic BP DScode-first design system

PageHeader

The top of a page's content: where it sits (breadcrumb), what it is (title, badge, and an optional icon) and the page actions. Below the AppHeader.

Master

Toggle sticky and shadow, pick a badge intent, turn the title icon on, and turn the action buttons off. More opens the overflow menu.

INV-1042

Draft

Usage

Put one PageHeader at the top of each page, under the AppHeader. It is one component: breadcrumbs are the page's parents, all links, starting with Home and then its side-nav section; the header closes the trail with the title as the current crumb, so it always reads Home › section › this page (like Home › Accounts › Northwind Traders). Then the title row with an optional badge, and an icon before the title only when you pass one (none by default), and the page actions on the end. actions are kit Buttons, size sm, with the one strong brand Button last; moreActions puts less-used actions in a More menu before them. sticky is the compact bar for when the page scrolls: one line whose trail ends in the page title, with a raised shadow unless shadow is false. See contracts/pageheader.json for the full contract. On a phone-width header, under 640px of its own width, the title row takes the full width and the actions move onto their own row under it, starting at the start edge; the compact sticky bar stays one 52px line, keeping only the page name in its trail, shortened with an ellipsis when it runs long. The bar adds no side padding of its own: the page inset comes from the layout class around it (contracts/layout.json), so the title lines up with the Sections under it. The bar is the top of the page, so it sits flush against the frame's bar with no page inset above it; the pattern holding it (AppShell, RecordPage) takes care of that.

Do's

  • The top of every page: record pages, lists, settings.
  • A page that scrolls: switch to sticky once the title scrolls away.
  • Every screen in an AppShell: pass Home and the side-nav section as breadcrumbs, and any parent record between them and the page.

Don'ts

  • Do not invent ContentHeader, PageTitle, TitleBar or a local heading row.
  • Do not put the app's logo, search or user in it. That is the AppHeader.
  • Do not put more than one strong brand Button in actions, or more than five visible actions.
  • Do not use raw hex.
  • Do not give it side padding to inset the page. Wrap the page in .layout-content, which owns that inset.
  • Do not leave Home out of breadcrumbs, and do not pass the page title as a crumb yourself. PageHeader adds it as the current crumb.
  • Do not repeat the section as a crumb on the section's own page, like Home › Accounts › Accounts. Pass only Home there.
<PageHeader
  title="INV-1042"
  breadcrumbs={[
    { label: "Home", href: "#" },
    { label: "Billing", href: "#" },
    { label: "Invoices", href: "#" },
  ]}
  badge="Draft"
  badgeIntent="neutral"
  actions={actions}
  moreActions={[
    { id: "duplicate", label: "Duplicate", icon: "content_copy" },
    { id: "pdf", label: "Download PDF", icon: "download" },
    { divider: true },
    { id: "delete", label: "Delete", icon: "delete", danger: true },
  ]}
/>