BlockHeading
Reusable section heading block with optional preheader, body copy, alignment, and size controls.
Best for
Import
import { BlockHeading } from "@enadhq/enad-react-sdk/client/storefront"When to use it
Use BlockHeading when a section needs a preheader, headline, and supporting copy that follow one consistent rhythm. It works well for editorial intros, campaign headers, and content sections that should share the same heading treatment.
Composition notes
BlockHeading is prop-driven. Use headingTag for document structure, headingSize for visual weight, and align when the section layout needs centered or right-aligned copy. headingClamp and bodyMaxWidth are useful when the surrounding grid needs more control over text length.
headingSize scales responsively, so pick the size for the section's overall importance rather than only for desktop. sm and md work well inside denser content grids, while lg and xl make more sense for campaign hero sections and wide editorial openers.
Behavior and theming guidance
Use the default color resolution first, then reach for preheaderColor, headingColor, or bodyColor only when the section has a stronger custom art direction. Set dark when the block sits on a dark surface so the text tokens flip automatically.
Keep headingTag tied to the page outline even when the visual size stays large. For long headlines, use headingClamp to protect the layout and bodyMaxWidth to stop the supporting copy from stretching too far across wide sections.
Examples
Live examples you can edit directly in the sandbox.
Centered campaign header
Use BlockHeading when a section needs a consistent heading stack without rebuilding spacing and typography each time.
Slots
Component Sets
Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| preheader | string | — | No description yet. |
| heading | string | — | No description yet. |
| body | string | — | No description yet. |
| dark | boolean | false | No description yet. |
| align | string | left | No description yet. |
| headingClamp | string | — | No description yet. |
| headingTag | string | h2 | No description yet. |
| headingSize | string | md | No description yet. |
| preheaderColor | string | — | No description yet. |
| headingColor | string | — | No description yet. |
| bodyColor | string | — | No description yet. |
| bodyMaxWidth | string | — | No description yet. |
| classNames | Partial<Record<BlockHeadingSlot, string>> | — | No description yet. Slot keys bodyheadingrootpreheader |
| className | string | — | No description yet. |