Theme Playground

Storefront

BlockHeading

Reusable section heading block with optional preheader, body copy, alignment, and size controls.

Best for

section headerseditorial introscampaign openers

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.

1 example

Centered campaign header

Use BlockHeading when a section needs a consistent heading stack without rebuilding spacing and typography each time.

Slots

bodyheadingrootpreheader

Component Sets

Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.

Props

PropTypeDefaultDescription
preheaderstring
No description yet.
headingstring
No description yet.
bodystring
No description yet.
darkbooleanfalse
No description yet.
alignstringleft
No description yet.
headingClampstring
No description yet.
headingTagstringh2
No description yet.
headingSizestringmd
No description yet.
preheaderColorstring
No description yet.
headingColorstring
No description yet.
bodyColorstring
No description yet.
bodyMaxWidthstring
No description yet.
classNamesPartial<Record<BlockHeadingSlot, string>>
No description yet.
Slot keys
bodyheadingrootpreheader
classNamestring
No description yet.