Layout

PageHeader

Page-level heading with named title, description, breadcrumb, and action regions.

import { PageHeader } from '@lostgradient/cinder';
pageheadinglayout
01

Overview

Reference usage

Page-level heading with named title, description, breadcrumb, and action regions.

Usage

svelte
<script lang="ts">
  import { PageHeader } from '@lostgradient/cinder';
</script>

<PageHeader title="Approvals" />

Create action, status and errors

A list page's create action is a createAction: a secondary icon-only "+" with a tooltip and an accessible name, drawn last in the actions region so it sits in the same place in every state, whether the list is empty or not. It is always secondary, because an empty state's own button is the only primary on an empty page. It goes inert under a stale <StaleRegion> (mutating defaults to true). A header whose only action is the create "+" keeps it at the right of the title on a phone, where any other actions drop to a row of their own.

svelte
<script lang="ts">
  import { PageHeader } from '@lostgradient/cinder';
</script>

<PageHeader
  title="Agents"
  description="Agents run your chats, goals and schedules."
  createAction={{ label: 'New agent', href: '/agents/new' }}
/>

While a full-page ErrorState shows under the header, pass error so the header's primary buttons draw as secondary and Try again is the only primary.

status takes the page's status as a snippet and statusPlacement puts it beside the title (inline, on its first line) or under it (below, the default). The title wraps to two lines and then ends in an ellipsis; its tooltip carries the full text, from title or, when title is a snippet, from titleText.

Flush

flush draws the header with no rule under it and no padding around it, so its title lines up with the content beneath. Use it where the page lays out its own column, such as a page of settings with a section navigation beside it; a header across the top of a page keeps its rule.

svelte
<script lang="ts">
  import { PageHeader } from '@lostgradient/cinder';
</script>

<PageHeader flush title="Allowed models" description="Which models agents may use." />
Live preview

Basic page header

Approvals

3 pending · 12 resolved

Schedules

Create and manage recurring automation schedules.

02

When to use

Use when
  • Rendering a route-level heading that needs consistent spacing and border treatment across pages.
  • Pairing page context and supporting copy with optional right-aligned controls.
Avoid when
  • Rendering section-scoped headings within page content — use section-heading.
  • Building complex hero layouts with rich copy and media — compose container (see its hero-section example).
03

Examples

Basic page header

Page-level heading with named title, description, breadcrumb, and action regions.

Create action, status and a full-page error

A list page’s create action is a secondary icon-only "+" with a tooltip and an accessible name, in the same place in every state. status sits beside the title or under it, a long title wraps to two lines and then ends in an ellipsis with the full title in its tooltip, and error draws the header’s primary buttons as secondary so Try again is the only primary.

04

Props

Props for page-header
Name
Type
Default
Description
title required text Page-level heading content. Rendered inside the headingLevel heading; snippets must emit phrasing content.
headingLevel 123456 1 Heading level for the title element. Defaults to 1.
description text Optional supporting content rendered below the title; snippets must emit phrasing content.
breadcrumbs snippet Optional breadcrumb navigation rendered above the heading row.
actions snippet Optional trailing actions (buttons, menus, controls).
createAction { /** The tooltip and the accessible name, such as "New agent" or "Start run". */ label: string; /** Render the action as a link to this address instead o…
Show full type { /** The tooltip and the accessible name, such as "New agent" or "Start run". */ label: string; /** Render the action as a link to this address instead of a button. */ href?: string; /** Called when the action is pressed. Not called while the action is inert. */ onclick?: (event: MouseEvent) => void; /** Disables the action: not focusable, not pressable. Prefer `inertReason`, which keeps focus. */ disabled?: boolean; /** * Makes the action inert and says why: it stays focusable, ignores the press, carries * `aria-disabled`, and the reason describes it ("Off until the list loads"). Use it where the * page cannot create yet but should still tell a keyboard user so, such as under a full-page * error. Under a stale `<StaleRegion>` the region's own reason does this. */ inertReason?: string; /** * Whether creating changes something, so the action goes inert under a stale `<StaleRegion>`. * @default true */ mutating?: boolean; /** A custom icon in place of the "+"; decorative, the label names the action. */ icon?: Snippet; }
A list page's create action, drawn last in the actions region as a secondary icon-only "+" with a tooltip. It is always secondary, in every state of the page.
error boolean false A full-page error state shows under this header. The header's primary buttons then draw as secondary, so the error's "Try again" is the only primary on the page.
flush boolean false Draws the header with no rule under it and no padding around it, so its title lines up with the content beneath it. A page that lays out its own column, such as a page of settings with a section navigation beside it, uses this; a header across the top of a page keeps its rule.
status snippet The page's status, such as a dot and "Waiting on you". It is a snippet so the page owns the words and the tone; see statusPlacement for where it sits.
statusPlacement 'inline' | 'below' 'below' Where status sits: inline beside the title on its first line, or below the title.
titleText text The title's plain text, for the tooltip that shows the full title when it is cut off, when title is a snippet. A string title is used as it is.