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
- Simple
- With Description
- With Actions
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 lgboolean
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
The Header component automatically handles responsive behavior, stacking elements vertically on smaller screens.
Best Practices
- Clear hierarchy: Use descriptive titles that clearly indicate the page purpose
- Concise descriptions: Keep descriptions brief (1-2 sentences)
- Relevant actions: Include only primary actions in the header
- Consistent structure: Use similar header patterns across related pages
- 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