---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Page header

The title block that opens a page, with its page-level actions, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `PageHeader`.

## Try it

Switch the look (default, divided, display), drop the description or the buttons, make the title long; narrow the window to see the buttons move.

The buttons only say they were pressed.

## When to use

- The title block that opens a page, with its page-level actions.

## Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Page header on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-page-header.json --yes
```

```text
Add the Goop Page header to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
import { PageHeader, PageHeaderMedia, PageHeaderContent, PageHeaderTitle, PageHeaderDescription, PageHeaderActions } from '@/components/ui/goop/page-header';
import { Button } from '@/components/ui/goop/button';

<>
  <PageHeader variant="display">
    <PageHeaderContent>
      <PageHeaderTitle>Overview</PageHeaderTitle>
      <PageHeaderDescription>Two releases ship this week, and three reviews are waiting on you.</PageHeaderDescription>
    </PageHeaderContent>
    <PageHeaderActions>
      <Button size="lg">New project</Button>
    </PageHeaderActions>
  </PageHeader>
  <PageHeader variant="divided">
    <PageHeaderTitle>Team directory</PageHeaderTitle>
    <PageHeaderActions>
      <Button size="lg" variant="outline">
        Export
      </Button>
      <Button size="lg">Add person</Button>
    </PageHeaderActions>
  </PageHeader>
</>
```

- Fits: account, board, flow, list, overview, settings, states, schedule (their recipes).
- The `divided` bar keeps its own sides, the page gutter: it spans the frame panel's width, as PageBody's first child or a settings template's `heading`, its title on the page's edge. Over a body with its own gutter (PageColumns' `header`) use the default header. Open an overview, a first-run, empty or reading page with the `display` look; never a dense list or a settings page. One per page: a block inside the page takes a SectionHeader, but a settings template's sections each open on a default PageHeader without a picture. In a template the header's margins give way to the template's own; never a margin class.
- height, width, padding, gap, corner, border, text: add no class for these.

## API reference

### Options

- `variant: default | divided | display = default`
- `spaced?: boolean = true` — Whether the header keeps its own space over and under it (keep it over a Wizard's step strip), or none (`false`: outside a template, in a holder of your own that spaces what follows).
- `Defaults: variant = 'default'`

### Parts

- `PageHeaderMedia` — The picture box beside the words (`default`)
- `PageHeaderContent` — The words' column (`default`, beside the picture; `display`, beside the buttons)
- `PageHeaderTitle` — The header's title, an `h2`; its size is the header's variant's; takes asChild
- `PageHeaderDescription` — The words under the title (`default`, `display`)
- `PageHeaderActions` — The page's buttons at the row's end (every look)

- Class recipes (cva): pageHeaderVariants (PageHeader)
- data-slot values (to select a part by): page-header, page-header-actions, page-header-content, page-header-description, page-header-media, page-header-title

## Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

## Related

- [Button](/themes/trail/components/button): A button with words that runs an action, in several looks and sizes.
- [Section header](/themes/trail/components/section-header): The title row over one block inside a page, with an optional count, description and actions, such as a settings section.
- [Toolbar](/themes/trail/components/toolbar): A row of controls over a list, such as a period select and its filter and view buttons.
- [Footer](/themes/trail/components/footer): The closing band of a marketing or a docs page, with its groups of links, legal text and small print.
