Layout
Header
Section heading with subtitle, indicator and before/after slots.
import { Header } from "datui";Playground
Section
Subtitle
<Header size="m" subtitle="Subtitle">Section</Header>Examples
Sizes and slots
Accessibility
- The title is a real heading (
h2by default, change withas). beforeTitle/afterTitle/beforeSubtitle/afterSubtitleicons arearia-hidden.
API
Header
Section heading with optional subtitle, indicator and before/after slots.
| Prop | Type | Default | Description |
|---|---|---|---|
| after | ReactNode | — | Content at the end, e.g. a `Link` or `Button`. |
| afterSubtitle | ReactNode | — | |
| afterTitle | ReactNode | — | |
| as | ElementType<any, keyof IntrinsicElements> | h2 | Heading element for the title. |
| before | ReactNode | — | Content before the whole header, e.g. an avatar. |
| beforeSubtitle | ReactNode | — | |
| beforeTitle | ReactNode | — | Icons around the title / subtitle text. Decorative. |
| className | string | — | |
| indicator | ReactNode | — | Secondary value right after the title, e.g. a count. |
| multiline | boolean | — | Wrap long text instead of truncating it. |
| size | "s" | "m" | "l" | "xl" | m | `xl` page-level title … `s` small caps label. |
| subtitle | ReactNode | — | |
| subtitleAs | ElementType<any, keyof IntrinsicElements> | span |