A dense page heading with a breadcrumb, a description and actions.
Production
HealthyRuns every workflow marked live. Changes here reach customers.
import type { Html } from "@effect/ui/html"import { Chip } from "./ui/uicontext/components/compact-dashboard/collection.ts"import { Button } from "./ui/uicontext/components/compact-dashboard/controls.ts"import { PageHeader } from "./ui/uicontext/components/compact-dashboard/page-header.ts"export const DeploymentHeader = <M>(h: Html.H<M>) => PageHeader(h, { title: "Production", description: "Runs every workflow marked live. Changes here reach customers.", breadcrumb: [h.a.attr("href", "#environments").children("Environments")], accessory: [Chip(h, "Healthy", "green", true)], actions: [Button(h, { variant: "outline" }).children("View logs"), Button(h).children("Deploy")], })Installation
pnpm dlx shadcn@latest add checkfu/uicontext/compact-page-headerUsage
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
| Name | Type | Description |
|---|---|---|
titlerequired | string | The page's title, as its heading |
description | string | A sentence under the title |
titleStyle | Style | Extra StyleX styles for the title |
accessory | View.Children | Content beside the title, such as a status chip |
actions | View.Children | Buttons at the end of the header |
breadcrumb | View.Children | Links above the title to the pages it sits under |
focus | boolean | Move focus to the title when it mounts, as after navigating to the page |
details | View.Content | A line between the title and the description, such as the record's id |
Accessibility
- The title is the page's
h1; withfocus, it takes focus after navigation so screen readers start there. - The breadcrumb is a
navlandmark named Breadcrumb.