Header

The header identifies the product and provides universal access to key tools and elements across all pages.

Figma logo The guideline content on this page is synced with Figma and can be used as a source of truth. Open in Figma


Anatomy

  1. Logo
  2. Link
  3. “Create new” button
  4. Icon button
  5. Search field
  6. User menu
Header anatomy diagram showing: 1 — Logo, 2 — Link (menu item), 3 — Create new button, 4 — Icon button, 5 — Search field, 6 — User menu

Usage

The header is a foundational element found on virtually every page of a digital product. It’s the first thing users see and acts as a central hub for essential functions.

It prominently displays the brand logo, helping users immediately identify the company. This builds trust and reinforces brand identity.

Header in context: Spiris logo at the left, a Create new primary button, three icon buttons (chat, notifications, help) and a user menu on the right

States

A component can have various states — such as enabled, hover, focused, and selected — which visually communicate its current behaviour and interactivity to the user.

  • Default — transparent on the header background.
  • Hover — lavender background fill (rectangular, no rounding).
  • Focused — sharp blue rectangle border (no rounding) to make keyboard focus unambiguous.
  • Selected — darker lavender background fill, indicates the current page.
Default
Hover
Focused
Selected

When a menu link is selected, we are using distinct visual cues to clearly indicate to the user that they are on the current page. This is essential for user orientation, preventing confusion, and ensuring a predictable navigation experience.


Accessibility

Keyboard interaction

All components should be reachable via TAB and SHIFT+TAB keys. The focused-state border is a deliberately sharp blue rectangle so keyboard focus stays unambiguous regardless of the selected state’s lavender treatment.

  • Selected menu items must use aria-current="page" — the lavender background fill alone is colour-only.
  • Icon buttons that carry a notification badge or dot must include the count in their accessible name (for example aria-label="Notifications, 2 unread").
  • The user menu trigger is a disclosure widget: pair aria-expanded with aria-controls pointing at the dropdown panel.

Best practices

Use brief text labels to identify the destination’s purpose. Long labels truncate, wrap, or push other items into the overflow menu — making the navigation harder to scan.

Do

Use brief text labels to identify the destination’s purpose.

Don't

Don’t use long text labels.


Specs

Header specs annotation showing 16 px vertical padding above and below the logo wordmark, 32 px gap between the logo and the first menu item, and 16 px right edge padding

Developer reference

The examples below show ready-to-copy markup for the canonical white header (.navbar-default). The deprecated colour variants are documented at the bottom of this section — they continue to ship in 2.x and are removed in 3.0.

For this component you need JavaScript. The Spiris Design System ships CSS only — the responsive navigation behaviour (collapse / dropdowns / overflow) must be wired up in the consuming application. The examples below mirror the reference scripts nc4navigation.js and app.js used on this docs site.

Complex example (three levels, product selection dropdown, user details dropdown)

The complex example retains the three-level navigation demo so consumers can see the second- and third-level sub-menu styles in context. Sub-menus are still supported — only the primary level was refreshed in 2.6.

User details dropdown

Simple example (one level)

Replace the navbar brand with your own image. See the example below.

If you need an item to have an icon instead of text in the main menu, add .icon on the <li> element that you want and add a <span> with the relevant icon class.

Badge on items. You can add a badge on icon items by inserting a <span class="badge">+99</span>, or by adding the .attention class on the <li> tag to render a dot.

Deprecated colour variants — removed in 3.0

The .navbar-primary (graphite) and .navbar-secondary (legacy white duplicate) colour variants are deprecated in 2.6 and removed in 3.0. The canonical .navbar-default is now the single supported white variant. Replace these classes with .navbar-default before upgrading to 3.0. See the migration guide and deprecations list at the repo root.

Graphite navigation (.navbar-primary) — deprecated

Demo page available at demo-page-primary.php until the 3.0 removal.

White navigation (.navbar-secondary) — deprecated

Demo page available at demo-page-secondary.php until the 3.0 removal.