GitHub

Site Header

Website header with navigation

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { SiteHeader } from "@corew500/ui/site-header"

<SiteHeader>Content</SiteHeader>

Variants

siteHeaderVariants

AxisValuesDefault
variant
defaultsolidtransparent
default

API Reference

Props

PropTypeDefaultDescription
logoenumLogo element or component
logoHrefstring/URL for logo link (defaults to "/")
navigationNavItem[][]Navigation items
actionsenumActions to show on the right side (buttons, etc.)
mobileMenuContentenumCustom content for mobile menu (replaces default nav rendering)
stickyenumfalseMake header sticky
fullWidthenumfalseUse full viewport width instead of container max-width
linkComponentenumaLink component to use for navigation (defaults to anchor)
variantenum

Accessibility

Keyboard Navigation

  • Keyboard accessible navigation and menu toggle

Screen Readers

  • Mobile menu button has aria-label and aria-expanded
  • Menu icons use aria-hidden="true"
  • Sheet has sr-only title and description for screen readers

Additional

  • - Uses semantic <header> element
  • Navigation uses proper list and link semantics

Localization

Translatable Content

  • - All text content flows through navigation prop
  • NavItem labels and descriptions should be pre-translated
  • Mobile menu button labels are hardcoded ("Open menu"/"Close menu")

Related