Section Header
Uppercase heading element for labeling content sections, with configurable heading level and variant.
Installation
dgadd ships in @diffgazer/add on npm: pnpm add -D @diffgazer/add puts it on pnpm exec, and npx @diffgazer/add runs it without the install.
UI components require Tailwind CSS v4. Local copy mode imports src/styles/styles.css; package mode uses @diffgazer/ui CSS from the installed package.
Usage
Examples
Variants
API Reference
SectionHeader
Accessibility
Notes
Variant
The variant prop controls visual intensity. Default uses foreground color, muted uses muted-foreground, and accent uses the theme accent for a highlighted section label.
Heading Level
The as prop renders as h2, h3, or h4 (defaults to h3). Each level carries its own size, weight, and letter-spacing so the three read as a scale: h2 is the largest and tightest, h4 the smallest and widest-tracked.
Spacing
SectionHeader owns no outside margin. The layout that places the header decides the gap below it (for example mb-2 next to body copy, or a flex gap in a stacked panel).
Source
Install via CLI: pnpm exec dgadd add ui/section-header.
Highlighted source loads after this disclosure opens. Browse the source repository.