SectionHeading
Section heading block: eyebrow, title (level 2–4), description and actions, with left/center alignment and three sizes.
Design intent
Marketing and content pages repeat the same eyebrow/title/description/actions cluster for every section. SectionHeading standardizes it without claiming the page h1 (that is PageHeader's job).
npx @slipstream-ui/cli@latest add section-headingBuilt for agents
Every component ships a machine-readable spec, so your assistant writes correct UI the first time.
Centered variant
Use align=center for hero-adjacent sections.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | required | Section title. |
| description | ReactNode | — | Supporting copy; accepts links and inline markup. |
| eyebrow | ReactNode | — | Kicker above the title. |
| actions | ReactNode | — | Right-aligned actions. |
| level | 2 | 3 | 4 | 2 | Heading level rendered for the title. |
| align | 'left' | 'center' | 'left' | Text and action alignment. |
| size | 'sm' | 'md' | 'lg' | 'md' | Title scale. |
| titleClassName | string | — | Extra classes for the title. |
| descriptionClassName | string | — | Extra classes for the description. |
| eyebrowClassName | string | — | Extra classes for the eyebrow. |
Anti-patterns
validate_usage is the MCP tool that rejects these mistakes: the same list agents see over MCP and in the canonical markdown.
Don't use it for the page title
PageHeader owns the single h1; SectionHeading defaults to h2.
tsx// Avoid two h1s<SectionHeading level={1} />// Prefer<PageHeader title="Page" />
Accessibility
- Renders h2 by default (PageHeader owns the page h1).
- Pass level={3} for nested subsections so the outline stays sequential.
Content guidelines
Titles
- Noun phrases
- Sentence case
- Parallel across sections
Good examples
- Built for agents
Bad examples
- Section 2
Composition
Compose with PageHeader: PageHeader for the h1; SectionHeading for h2+ sections
<PageHeader title="…" /><SectionHeading title="…" />
Related components: PageHeader, Heading, Text
Dependencies
What the registry installs alongside this component. Package imports already include these.
npm packages
- class-variance-authority
- clsx
- tailwind-merge
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+: macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA, the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.