Header
A polymorphic start, center, and end header layout.
Header arranges stable start and end actions around a flexible center region. Its rounded default surface uses --sidebar (#eceff1 in light mode and #0f0f0f in dark mode), falling back to --background-default. It remains customizable through className, making it suitable for application headers, contextual toolbars, breadcrumbs, and status rows.
Workspace
Production environment
Import
Section titled “Import”import { Header } from "@zentara-co/zenos-ui";Regions
Section titled “Regions”Use start for branding or navigation, children for the flexible center, and end for actions. Empty regions are omitted from the DOM.
API reference
Semantic element
Section titled “Semantic element”Header renders a div by default. Use as="header" for a page or application banner, or as="nav" when the whole region is navigation. The selected element controls the available native props and ref type.
API
| Prop | Type | Default | Description |
|---|---|---|---|
as | ElementType | div | Rendered semantic element. |
start | ReactNode | — | Content anchored at the logical start. |
children | ReactNode | — | Flexible center content. |
end | ReactNode | — | Content anchored at the logical end. |
native props | React.HTMLAttributes<HTMLElement> | — | Forwards native attributes, events, aria-*, data-*, className, style, and ref. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”Choose as by meaning rather than appearance. A header becomes a banner landmark only in the appropriate document context, while a nav needs an accessible label when more than one navigation landmark exists.