Compact Page Header

A dense page heading with a breadcrumb, a description and actions.

Production

Healthy

Runs every workflow marked live. Changes here reach customers.

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/compact-page-header

Usage

import { PageHeader } from "./ui/uicontext/components/compact-dashboard/page-header.ts"
export const EnvironmentsHeader = <M>(h: Html.H<M>) =>	PageHeader(h, { title: "Environments", description: "Where your workflows run." })

API reference

Options

PageHeader options
NameTypeDescription
titlerequiredstringThe page's title, as its heading
descriptionstringA sentence under the title
titleStyleStyleExtra StyleX styles for the title
accessoryView.ChildrenContent beside the title, such as a status chip
actionsView.ChildrenButtons at the end of the header
breadcrumbView.ChildrenLinks above the title to the pages it sits under
focusbooleanMove focus to the title when it mounts, as after navigating to the page
detailsView.ContentA line between the title and the description, such as the record's id

Accessibility

  • The title is the page's h1; with focus, it takes focus after navigation so screen readers start there.
  • The breadcrumb is a nav landmark named Breadcrumb.

Source