# Page head

The first line of a page: its name, a quiet line, a view's switcher and its actions, on the page's text inset.

Live variants: https://design.arcadia.is/components/page-head

```tsx
import { PageHead } from "@arcadia/ui";
```

```tsx
import { PageHead, IconButton } from "@arcadia/ui";

<PageHead
  back={<IconButton icon="chevron-left" label="Back to projects" size="sm" tone="muted" />}
  title="Release overview"
  meta="4 of 12 cards in progress"
/>
```

## Accessibility

The name is the page's h1, and the quiet line under it a paragraph read after it. A back control is a control with its own name, before the title in the tab order; the switcher and the actions follow. The heading draws no ring, since it is not a control: keyboard focus reaches it only through `titleRef`, when the product moves it there.

The head sets no landmark of its own beyond its header: the page it opens is the main region, and a reader meets the name once.

## API reference

### PageHead

- `title` (`ReactNode`, required): The page's name, inside its heading: words, or a quiet node beside them.
- `variant` (`"page" | "pane"`, default `"page"`): `page`, the page's h1; `pane`, an app's head inside another app's pane (Body bold, L92).
- `size` (`"title-2" | "title-3"`, default `"title-3"`): `title-3`, the app panel's; `title-2` for a page that stands alone on a public surface.
- `back` (`ReactNode`): Before the name in `variant="page"`: a back control, at the title's line.
- `leading` (`ReactNode`): Before the name in `variant="pane"`: the app's mark, a glyph's size.
- `meta` (`ReactNode`): Under the name in `variant="page"`, quiet: a subtitle, a count, where the rows are read from.
- `switcher` (`ReactNode`): At the head's end in `variant="page"`, before the actions: a view's tabs or a segmented control.
- `actions` (`ReactNode`): Controls at the head's end, after the switcher in `variant="page"` or centred on the title in `variant="pane"`.
- `titleRef` (`Ref<HTMLHeadingElement>`): Gives the heading a ref and its one stop for a keyboard: a route change moves focus here, and the heading draws no ring.
- `titleId` (`string`)
- `level` (`1 | 2 | 3 | 4 | 5 | 6`): The heading rank. Default 1 for `page`, 2 for `pane`.
- `edge` (`boolean`, default `true`): The head carries the page's text inset (`--card-text-inset`) in `variant="page"`. false where its column already has it.
- `rootStyle` (`PageHeadStyle`): Typed StyleX override: where the head sits and `--page-head-px`.
