Skip to main content

Overview

The Header component provides consistent page header patterns with titles, descriptions, breadcrumbs, and action buttons. It helps establish clear page hierarchy and context.

Basic Usage

Header Variants

Basic header with just a title.

Header with Tabs

Combine the header with tab navigation:

Header Sizes

Props

string
required
The main heading text
string
Optional description or subtitle text
ReactNode
Breadcrumb navigation component
ReactNode
Action buttons or elements aligned to the right
ReactNode
Tab navigation component
string
default:"md"
Header size: sm, md, or lg
boolean
default:"true"
Whether to show a bottom border divider
boolean
default:"false"
Whether the header sticks to the top when scrolling
ReactNode
Additional custom content
string
Additional CSS class names

TypeScript Interface

Complete Examples

Dashboard Header

Settings Page Header

List Page Header

Detail Page Header

Sticky Header for Long Pages

Layout Integration

Use the sticky prop for headers on long pages to keep navigation and actions accessible while scrolling.
The Header component automatically handles responsive behavior, stacking elements vertically on smaller screens.

Best Practices

  1. Clear hierarchy: Use descriptive titles that clearly indicate the page purpose
  2. Concise descriptions: Keep descriptions brief (1-2 sentences)
  3. Relevant actions: Include only primary actions in the header
  4. Consistent structure: Use similar header patterns across related pages
  5. Breadcrumbs: Include breadcrumbs on detail/nested pages to show navigation context

Accessibility

  • Uses semantic HTML (<header>, <h1>)
  • Proper heading hierarchy for screen readers
  • Action buttons are keyboard accessible
  • Sticky headers maintain focus management
  • ARIA labels for navigation elements