Skip to main content

Catalog · Navigation

Masthead

Starts the front page and the sections of a newspaper with the date, a search, the publication's name in large type and its sections, in three rows that scroll away with the page.

Fits best: blog — the front page and the sections of a newspaper, where the name and the date set the tone

Example

The masthead of a newspaper: the date and a button, the name, and the sections.

The Vejer Review

At 768 px of window width and below the sections collapse into a menu, the catalog's navbar.

The masthead is not sticky: three rows stuck to the top would take a third of a phone's screen. For one row that stays at the top, use the site header with --publication.

Known issues

The masthead's own issue, and those of the pieces it is made of.

  • The masthead's menu without anchor positioning. In browsers without CSS anchor positioning, the sections menu of the masthead header opens near the top of the window and covers the publication name and the menu button while it is open. Escape, or a click outside the menu, closes it and returns to the page.
  • The menu panel. If you keep pressing Tab after the last link of the open menu, focus moves on into the page and the menu stays open over it; Escape closes it. See the navbar's known issues.

Code

Copy the markup

Bundler
import "@luz-ds/catalog/components/masthead.css";
HTML
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@luz-ds/catalog@0.3.0/dist/components/masthead.min.css" integrity="sha384-Z8LZh/hdX8e75aVw/+7wsEa/DGjmU5P5Jr3gDfMgW5yUXZw0JBlB1bEZt8nUX9nx" crossorigin="anonymous">

With catalog's search in the top row:

HTML
<header class="luz-masthead">
  <div class="o-container o-container--inline o-stack">
    <div class="o-row luz-masthead__top">
      <p class="luz-masthead__date"><time datetime="2026-10-14">Wednesday, 14 October 2026</time></p>
      <div class="o-row luz-masthead__actions">
        <luz-search>…</luz-search>
      </div>
    </div>
    <a class="luz-masthead__brand" href="/">The Vejer Review</a>
    <div class="o-row luz-masthead__sections">
      <button class="luz-nav-toggle" type="button" popovertarget="masthead-nav" aria-label="Sections">…</button>
      <nav class="luz-navbar" id="masthead-nav" aria-label="Sections" popover>…</nav>
    </div>
  </div>
</header>

Variants and options

No modifiers. The masthead is a class of catalog on a native <header>, laid out by core's objects in the markup.

ClassEffect
.luz-masthead
On <header>: the newspaper's masthead. The page surface, three rows in an .o-stack, 16 px above and below, not sticky
.luz-masthead__top
On a .o-row: the date at the start and the actions at the end, on one row
.luz-masthead__date
Today's date in a <time datetime>, small and secondary; it wraps to give the actions their room
.luz-masthead__actions
On a .o-row: catalog's search, then its language switch
.luz-masthead__brand
The publication's name as a link to the home page, in the heading font, large and centred, semibold, underlined on hover only. A logo <img> inside it is 88 px tall
.luz-masthead__sections
On a .o-row: the menu button and the navbar between two rules, centred from 769 px; its panel opens under this row
.o-container.o-container--inline.o-stack (core)
The width and gutters of the page, so the masthead starts where the content starts, and its three rows
.luz-nav-toggle, .luz-navbar (catalog)
The menu button and the sections: see the navbar

How it works

CSS from components/masthead.css of @luz-ds/catalog on core's objects and the catalog's navbar. No JavaScript.

  • The masthead adds the skin only: the page surface, the brand, the rules of the sections row and the date. Core gives the rest: .o-container--inline the gutters, .o-row and .o-stack the rows, and the navbar the links and their panel.
  • The masthead is not sticky: three rows stuck to the top would take a third of a phone's screen. Its brand is 49 px from 1024 px, 39 px below and 31 px at 640 px and below (--luz-text-4xl, -3xl and -2xl, the steps of the hero).
  • The masthead, and the sections row inside it, name themselves the anchor --luz-bar, scoped to themselves. Where the browser supports CSS anchor positioning, the navbar's panel opens under the sections row. Elsewhere it opens at --luz-bar-h from the top of the window (see Known issues).
  • With @luz-ds/catalog, the list of its <luz-lang-switch> opens under the masthead. Without it nothing changes: the rules that refine the catalog's elements match nothing.

Without JavaScript

Nothing changes: the menu is a popover opened by the button's popovertarget, with no script, the links are plain links, and catalog's search shows its link to the A–Z index.

Keyboard and ARIA

  • Order: the order of the source: the actions of the top row, the brand, then the menu button and the sections.
  • Keys: Enter or Space on the menu button opens and closes the panel; Escape closes it and returns focus to the button. The panel is not modal: Tab after its last link moves on.
  • Names: the <nav> and the menu button are both named "Sections"; the browser exposes the button's expanded state. The section of an article has aria-current="true", the section's own index aria-current="page"; both are underlined.
  • Brand: a link, never a heading: the story's title is the page's one h1. A logo is an <img> whose alt is the publication's name, with no text beside it.
  • Landmarks: a <header> that is a direct child of <body> is the banner. Put the skip link before it.

Contrast and focus are in the Design tab.

Design

When to use

Use the masthead at the top of a newspaper's front page and of its sections, where the name and the date set the tone and the reader reaches every section.

When not to use

Do not use it on every page of a blog: for one row that stays at the top, use the site header with --publication.

  • One header per page, never inside a component or an article: it is the page's banner.
  • Do not make the masthead sticky, and do not put the date in a one-row bar: in one row it competes with the name.

Do and don't

Do The publication's name as text, and a few sections named as the reader knows them.
Don't The name cut short with an ellipsis, or every tag of the site as a section: the reader cannot tell where they are.

Writing the content

The brand is the publication's name; the sections are the names readers use for its parts.

  • Brand: the name in full, as it appears on the publication. It wraps at a narrow width; never shorten it with an ellipsis.
  • Sections: four to seven, one or two words each, the same words as the titles of their index pages.
  • Date: written out in the language of the page, "Wednesday, 14 October 2026", with the same day in datetime.
  • Menu button: "Sections", translated like the rest of the page.

Contrast and focus

Text sits on the page surface, in the rows and in the open panel. The scrim starts under the masthead, so it is never dimmed.

PartColour on backgroundLightDarkHigh contrastNeeds
Brand and current section
--luz-text-primary on --luz-surface-page
15.8:1
15.1:1
21.0:1
4.5:1
Sections and date
--luz-text-secondary on --luz-surface-page
6.2:1
7.5:1
19.3:1
4.5:1
Focus ring
--luz-focus-ring on --luz-surface-page
5.6:1
7.7:1
21.0:1
3:1

Measured from the token values of each mode, rounded down. Needs is the WCAG 2.2 AA minimum: 4.5:1 for text, 3:1 for focus rings, borders and icons.

  • Focus: every link and button in the header keeps core's ring, 2 px of --luz-focus-ring. The current section has an underline as well as its colour, so the mark does not depend on colour.
  • Edges: the two rules of the sections row (--luz-divider) are decorative and have no minimum; forced colours keep them.

Tokens it uses

The 15 tokens that the .luz-masthead rules of catalog’s components/masthead.css read, by family. Each family links to its page, with the values in every mode. In Figma they are variables with the same names: see Tokens in Figma.

Spacing and sizing
--luz-control-lg, --luz-space-2xs, --luz-space-md, --luz-space-xs
Typography
--luz-font-heading, --luz-font-sans, --luz-text-2xl, --luz-text-3xl, --luz-text-4xl, --luz-text-sm

Keyboard and ARIA are in the Code tab.