components/bits/SectionHeader#
SectionHeader()#
The app's one section-title surface: optional icon, a title, an optional subtitle, right-aligned actions and an optional rule beneath.
This exists because the same header was being rebuilt inline everywhere —
85 variant="subtitle2", 53 variant="h6", 28 textTransform: 'uppercase'
treatments and 38 <Divider>s, each with its own weight, colour, letter
spacing and padding. Sizes come from the theme's typography scale rather than
an sx fontSize, so check:theme keeps them there.
Parameters#
| Parameter | Type |
|---|---|
props |
SectionHeaderProps |
Returns#
Element
SectionHeaderProps#
Properties#
action?#
Trailing controls — buttons, toggles, a count chip. Right-aligned.
dense?#
Removes the vertical padding, for headers inside an already-padded row.
divider?#
Render a <Divider> beneath the header.
icon?#
Leading glyph. Sized by the header so every section lines up.
subtitle?#
Secondary line under the title (counts, hints, the "why" of the section).
sx?#
title#
The section label. Kept as a string so the header can style it itself.
variant?#
Visual weight.
section (default) is the workhorse — what 85 variant="subtitle2" sites
were hand-rolling. page is the one-per-surface title that was 53 loose
variant="h6" tags. overline is the small uppercase label used to divide
a form or a settings pane into bands.