datui
Color scheme

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

Overview

Your profile at a glance

Friends

24
Show all

Favorites

Pinned by you

Settings

Accessibility

  • The title is a real heading (h2 by default, change with as).
  • beforeTitle/afterTitle/beforeSubtitle/afterSubtitle icons are aria-hidden.

API

Header

Section heading with optional subtitle, indicator and before/after slots.

PropTypeDefaultDescription
afterReactNode—Content at the end, e.g. a `Link` or `Button`.
afterSubtitleReactNode—
afterTitleReactNode—
asElementType<any, keyof IntrinsicElements>h2Heading element for the title.
beforeReactNode—Content before the whole header, e.g. an avatar.
beforeSubtitleReactNode—
beforeTitleReactNode—Icons around the title / subtitle text. Decorative.
classNamestring—
indicatorReactNode—Secondary value right after the title, e.g. a count.
multilineboolean—Wrap long text instead of truncating it.
size"s" | "m" | "l" | "xl"m`xl` page-level title … `s` small caps label.
subtitleReactNode—
subtitleAsElementType<any, keyof IntrinsicElements>span