Page header
Title, description and one primary action: the action the page exists for.
Preview
Posts
Posts
What IPM Facility publishes, on every platform.
<header class="nx-pagehead">
<div class="nx-pagehead__row">
<div class="nx-pagehead__text">
<h1 class="nx-pagehead__title">Posts</h1>
<p class="nx-pagehead__desc">What IPM Facility publishes, on
every platform.</p>
</div>
<div class="nx-pagehead__actions">
<button type="button"
class="nx-btn nx-btn--ghost">Export</button>
<button type="button"
class="nx-btn nx-btn--primary">Write post</button>
</div>
</div>
</header><NxPageHeader
title="Posts"
description="What IPM Facility publishes, on every platform."
primaryAction={<NxButton>Write post</NxButton>}
secondaryActions={[
<NxButton key="x" variant="ghost">Export</NxButton>,
]}
/>API
React props (NxKit)
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
title | ReactNode | Required | The page's h1. | |
description | ReactNode | undefined | One line of context. | |
primaryAction | ReactNode | undefined | Exactly one primary button. | |
secondaryActions | ReactNode[] | [] | At most 2 (dev-warns); more go into a menu. | |
breadcrumb | ReactNode | undefined | An NxBreadcrumb above the title. |
Classes
| Class | Description |
|---|---|
.nx-pagehead | Header block |
.nx-pagehead__actions | Secondary then primary, wraps on narrow screens |
Accessibility
- Renders the page's only h1.
Do / Don’t
- Do: One primary per view.Don't put two primary buttons in the header.