Skip to content

Page Header

The title row of a page: breadcrumbs, title, status, actions and optional page tabs.

Base UI1.6 kB gzipSource Registry JSON

PageHeader playground

heron

Live

heron.sproutboat.app

Props

Installation

npx shadcn@latest add https://sproutboat.com/ikada/r/page-header.json

The CLI writes components/ikada/page-header.tsx and merges the ikada theme into your CSS. Or take it from the package: import { PageHeader, PageTabs, PageTab } from "@sproutboat/ikada";

Usage

import { PageHeader, PageTabs, PageTab } from "@/components/ikada/page-header";

<PageHeader
  title="heron"
  status={<StatusDot tone="success" live label="Live" />}
  description="heron.sproutboat.app"
  actions={<Button variant="primary">Deploy</Button>}
/>

Examples

Title and actions

The title is the page's only h1. Actions sit on the right and wrap under it on narrow screens.

robin

robin.sproutboat.app

Breadcrumbs and status

wren

Live

eu-west · main · 3 minutes ago

With tabs

PageTabs sit on the header's bottom rule; the current tab carries the underline.

finch

Building

finch.sproutboat.app

Props

PageHeaderProps
PropTypeDescription
breadcrumbsReactNodeUsually <Breadcrumbs />.
titlerequiredReactNodePage title, rendered as the h1.
statusReactNodeNext to the title: a StatusDot or Badge.
descriptionReactNodeOne muted line under the title: domain, repo, branch.
actionsReactNodeButtons, right-aligned; they wrap under the title on narrow screens.
tabsReactNodeUsually <PageTabs>. Sits on the header's bottom rule.
headingLevel"h1" | "h2" | "h3" | "h4"Heading level of the title. Default `h1`; use a lower level when the header is not the page's own title.

Also takes every prop of Omit<ComponentProps<"header">, "title">.

PageTabProps
PropTypeDescription
currentbooleanMarks the tab as the current page (aria-current and the underline). Default `false`.
renderReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
classNamestringClasses merged onto the root element, after ikada's own.

Also takes every prop of WithClass<useRender.ComponentProps<"a">>.

PageTabsProps
PropTypeDescription
labelstringDefault `Page sections`.

Source: src/components/page-header.tsx