Skip to content

Page headers

⋯

The Figma Header Nav and Header Filter components are product page headers. Nesra UI does not export them. This page shows how to build them from public components. Copy an example and replace the sample content, actions, and data with your own.

Each example is responsive to its own width through Tailwind container queries (@container), not the viewport width. A header beside a Sidebar therefore uses the layout that fits the space it has.

Figma Screen Figma width Example container width
Desktop 1200px 1024px and wider (@5xl)
Tab 769px 768px to 1023px (@3xl)
Mobile 375px narrower than 768px

The previews below render each example at the three Figma widths. Wider frames scroll sideways when the page is narrow.

Figma Header Nav, Variant=BE Marketing. The page title sits on the left. On the right are a workspace Select, a divider, and three outline icon Buttons. The notification button shows an unread count. On Mobile, the divider and buttons move into a DropdownMenu behind a More actions button.

Desktop · 1200px

Overview

Tab · 769px

Overview

Mobile · 375px

Overview

Figma Header Nav, Variant=BE Finance. The right side holds a search InputGroup with a ⌘K hint and a notification button. Command-K or Control-K focuses the search field. The search field narrows from 340px to 152px on Mobile.

Desktop · 1200px

Overview

Tab · 769px

Overview

Mobile · 375px

Overview

Figma Header Filter. Labeled filters sit on the left and the last sync time on the right.

Screen Visible filters In the panel
Desktop Date range, Comparison period, Data source Channel, behind More filters
Tab Date range Comparison period, Data source, Channel
Mobile none Every filter, behind Filter

Date ranges open a Popover with a DatePicker calendar. The panels are Popovers triggered by Filters.Trigger. All copies of a filter share one state, so a value set in a panel stays set when the width changes. The application owns the filter values, their defaults, and the data they query.

Desktop · 1200px

Last sync:

Tab · 769px

Last sync:

Mobile · 375px

Last sync:

The examples follow the page theme. Dark applies when an ancestor has the dark class or data-theme="dark". Headers use Foundation/bg-neutral with a Stroke/stroke-border bottom border. Titles use Text/text-headline. The sync time uses Text/text-support and Icon/icon-muted. The unread count uses Action/destructive-default with Text/text-static-white in both modes.

  • Each title is the page h1. Keep one h1 per page.
  • Icon-only buttons have an aria-label. The unread count is part of the notification button’s name, and the visual count is hidden from assistive technology.
  • The workspace Select is named by aria-label. Its avatar is decorative.
  • The search field sits in a form with role="search". aria-keyshortcuts announces the shortcut. The ⌘K hint is decorative.
  • Each date range trigger is named by its visible label and described by the selected range.
  • Changing the workspace, running a search, and applying filters remain the application’s responsibility.

Figma does not define these, so the examples choose a behavior:

  • Breakpoints. Figma shows three fixed widths. The examples switch at container widths of 768px and 1024px.
  • Mobile actions. Figma shows a More actions button on Mobile, but not its contents. The example opens a DropdownMenu with the three hidden actions.
  • Filter panels. Figma does not show what More filters or Filter open. The examples open a Popover with the filters hidden at that width, plus a sample Channel filter.
  • Keyboard shortcut. Figma shows the ⌘K hint but no behavior. The example focuses the search field on Command-K or Control-K. It skips the key when another handler already called preventDefault(). On this docs site, the docs search takes ⌘K first.
  • Hidden breadcrumb. Each Figma header has a hidden Breadcrumb beside the title. The examples show only the title. Use Breadcrumb there when the page needs it.

The examples use package components as they are, so a few details differ from the Figma frames:

  • The workspace Select is 36px tall with a chevron-down icon. Figma draws a 40px trigger with a shadow and a chevrons-up-down icon.
  • Icon buttons use the outline Button, which adds its fill and shadow-xs. Figma’s _Nav button has only a border. Button sizes are 32px or 40px, so the examples set size-nesra-unit-17! for Figma’s 36px. Date range and filter triggers set h-nesra-unit-17! for the same reason.
  • Filters.Trigger places the filter icon before its label. Figma places it after.
  • Field labels use the Field label role Text/text-headline with a 12px gap above the control. Figma uses Text/text-body with an 8px gap.
  • Both Header Nav examples use 16px side padding on Mobile. Figma uses 16px for BE Marketing and 24px for BE Finance.

See Navigation Menu Item for horizontal navigation items, and Filters, Select, and Date Picker for the composed parts.