Skip to content

Block 88 of 297

Header — Simple

Wordmark, a short row of links, a quiet secondary link and one button, with an optional sticky mode and a no-JavaScript phone menu.

Puck key
HeaderSimpleBlock
Export
headerSimpleBlock
React component
<HeaderSimple />
Path
components/puck/header-simple-block.tsx
Dependencies
None
License
MIT

About this block

When to use it, how to write for it, and what to change in the code.

What it's for

A clean, single-row header: wordmark or logo on the left, up to six plain links in the middle, then an optional quiet text link and a rounded button. It can be set to stick to the top while scrolling. On tablets and phones the links move into a "Menu" panel, and on phones the button moves in too.

  • Small organizations with a handful of top-level pages
  • Campaign or program microsites
  • Sites with a partner or member login alongside a primary action
Writing the content
  • Four or five Menu links read best; the field stops at 6. Anything larger needs a header with dropdowns.
  • Use Secondary link text for something low-key like "Partner login". It shows as plain text beside the button on desktop and as an outlined button in the phone menu.
  • Stick to top works only when the header is a direct child of the page body.
  • Set Current section to the path of the active section so its link gets the underline marker.
Accessibility
  • The phone menu is a native details element, so it opens with Enter or Space and needs no script. Its nav is named from Navigation name plus "(mobile)".
  • The active link carries aria-current="page" as well as a visual underline, so the current location isn't shown by styling alone.
  • Links, toggle and button keep a 44px minimum height (48px in the phone menu) and a focus outline.
Customizing the code
  • The button is bg-neutral-950 that turns indigo-700 on hover, and the active underline is bg-indigo-600; swap these for your brand.
  • Header height is min-h-16 lg:min-h-20 on the inner container.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Site nametext
  • Logo image URLtext
  • Logo alt texttext
  • Logo linktext
  • Navigation nametext
  • Menu linksarray
  • Current sectiontext
  • Secondary link texttext
  • Secondary linktext
  • Button texttext
  • Button linktext
  • Mobile menu labeltext
  • Stick to topradio