Data display

Horizontal Bar
v0.2.3
Documentation Under Review

A flexible compound component system for creating product application headers and navigation bars with customizable start, middle, and end sections.

Prefer AI-assisted development?

This documentation is available via the Catalyst MCP Server. Learn how to connect →

Catalyst Horizontal Bar provides a flexible layout container for product application headers, navigation bars, and footer bars — combining a compound component pattern with built-in Catalyst design tokens so you get responsive default and transparent variants with zero boilerplate.

Preview

Installation

npm install @pmi/catalyst-horizontal-bar
import {
  HorizontalBarRoot,
  HorizontalBarStart,
  HorizontalBarMiddle,
  HorizontalBarEnd,
} from '@pmi/catalyst-horizontal-bar';

Common Patterns

Basic

A minimal header with logo branding and a user identity area. On mobile the hamburger menu replaces the start logo slot.

Preview

Action

Header with a primary call-to-action button in the end section, useful for product dashboards that need a prominent task entry point.

Preview

Header with an integrated search field on desktop that collapses to an icon-only button on mobile.

Preview

Basic start

Standard horizontal bar start section with PMI logo that adapts to light/dark mode.

Preview

Basic middle

Standard horizontal bar middle section with centered logo.

Preview

Basic end

Standard horizontal bar end section with user information and avatar.

API Reference

Horizontal Bar is a compound component. The sections below document the API surface for each part.

HorizontalBarRoot

The outer container that holds the three layout sections and controls the visual variant and border position.

Prop

Type

HorizontalBarStart

Left-aligned slot (flex-grow, justify-start). All content placed here is pinned to the start edge.

Prop

Type

HorizontalBarMiddle

Centre-aligned slot (mx-auto, justify-center). Use for a centred logo or title on mobile.

Prop

Type

HorizontalBarEnd

Right-aligned slot (flex-grow, justify-end). Use for action buttons, avatar links, or utility icons.

Prop

Type

Accessibility

Horizontal Bar is designed to meet WCAG 2.2 AA standards.

Keyboard Interactions

KeyAction
TabMoves focus through interactive elements inside the bar
Shift + TabMoves focus backward through interactive elements in the bar
EnterActivates the focused link or button

ARIA

  • HorizontalBarRoot renders a plain <div>. Wrap it in a <header> with role="banner" or a <nav> with aria-label if it serves as a landmark.
  • Icon-only buttons inside the bar must have aria-label for accessibility.
  • Logo links should include aria-label (e.g. "Project Management Institute") and aria-current="page" when appropriate.
  • Catalyst adds the visual styling tokens; consuming teams are responsible for correct landmark and label semantics.

Choosing the Right Component

Use Horizontal Bar when you need a full-width application header or footer bar with distinct start / middle / end layout zones. Reach for a different primitive when:

If you need…Use instead
A vertical side navigation panelSidebar
A horizontal tab-based page navigationTabs
A full-page navigation menu with flyout sectionsNavigation Menu
A dropdown or context menu triggered by a buttonDropdown Menu
A page-level footer with links and legal textFooter

On this page