Skip to content

Page header

Title, description and one primary action: the action the page exists for.

View as Markdown

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>

API

React props (NxKit)

React (NxKit) props
PropTypeDefaultRequiredDescription
titleReactNodeRequiredThe page's h1.
descriptionReactNodeundefinedOne line of context.
primaryActionReactNodeundefinedExactly one primary button.
secondaryActionsReactNode[][]At most 2 (dev-warns); more go into a menu.
breadcrumbReactNodeundefinedAn NxBreadcrumb above the title.

Classes

Framework-agnostic classes
ClassDescription
.nx-pageheadHeader block
.nx-pagehead__actionsSecondary 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.

View in spec