PageHeader

June 7, 2026 · View on GitHub

Content-area header. Three sizes, optional breadcrumbs, back button, description, actions slot, tabs slot, and bottom divider.

Contract

<kp-page-header> sits at the top of a content area (inside Container, below Header). It gathers the page's identity — breadcrumb trail, title, description, primary actions — in a single block and optionally provides a Tabs strip for sub-navigation.

Slots:

  • [kpPageHeaderBreadcrumbs] — your Breadcrumbs instance
  • [kpPageHeaderTitle] — custom title node (e.g., title + inline Badge)
  • [kpPageHeaderActions] — action buttons on the right
  • [kpPageHeaderTabs] — your Tabs instance under the header

API

Inputs

NameTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Title scale and spacing
titlestring'Page title'Displayed when [kpPageHeaderTitle] slot is empty
descriptionstring | nullnullShown when showDescription=true
showBreadcrumbsbooleanfalse
showBackButtonbooleanfalseLeft-side arrow button
showDescriptionbooleanfalse
showActionsbooleanfalse
showTabsbooleanfalse
showBottomDividerbooleantrueBorder below the block

Outputs

NameFires when
backClickBack-arrow button pressed

Sizes

SizeTitleDescriptionPadding-bottom
sm18px / medium13px16px
md24px / medium14px24px
lg30px / semibold16px32px

Do / Don't

Do

  • Pick one size per content scopemd for most app pages, lg for detail / hero pages, sm for drawers or settings subpages.
  • Use breadcrumbs when the page is 2+ levels deep. A single-level page doesn't need a breadcrumb "Home › Page title".
  • Put the primary action furthest right and the secondary (ghost) to its left. Match the Button order conventions.

Don't

  • Don't duplicate the title in the browser tab only — page title belongs visible in the PageHeader too.
  • Don't use both Back button and Breadcrumbs. They're redundant; pick one per navigation style.
  • Don't put more than 3 actions in the actions slot. If you need more, use a DropdownMenu behind a "More" button.

References

Changelog

  • 0.1.0 — Initial release. 3 sizes, 6 toggleable sections, slot projection for breadcrumbs / title / actions / tabs.