ComponentsContent & DisplayHeading

Content Display

Heading

Semantic heading block for builder canvas and app player. Supports levels h1 to h6, centered alignment by default, optional subtitle text, and configurable heading color and font family.

Quick startAdd in 3 steps

Component picker → Content DisplayHeading, then set text, level, and alignment.

Heading levelsh1 to h6

Legacy numeric values 1 to 6 are still accepted and normalized.

DefaultsCentered alignment

Resolves alignment with textAlign ?? align ?? ‘center’ for backward compatibility.

What it does

Four things worth knowing

Semantic heading levels with legacy support

Supports h1 to h6 for semantic structure. Older saved data using numeric levels 1 to 6 still works and is normalized internally.

Centered by default, with fallback alignment

Alignment resolves from textAlign first, then legacy align, then center. This keeps old apps compatible while using current registry props.

Optional subtitle with visibility guard

Subtitle renders only when showSubtitle is truthy and subtitle has content, so empty subtitles do not reserve extra vertical space.

Configurable typography and style tuning

Heading color, font family, level sizing, and level weights are adjustable. The title also uses slight negative letter spacing for tighter visual rhythm.

Builder setup

Find it, drop it, and configure text

Where to find itAdd it to any screen

  1. Component picker → Content DisplayHeading.
  2. Drop it anywhere you need section hierarchy or page title context.
  3. Configure text, level, alignment, and style in the property editor.

Before you publishThree things to check

  1. Use semantic level order (h1 to h6) to keep hierarchy readable.
  2. Confirm alignment and font family match the surrounding layout.
  3. If subtitle is enabled, verify copy and contrast before publishing.
Category: Content DisplayComponent: BuilderHeadingRegistry key: headingDefault alignment: center
Props

Primary and optional fields

PropTypeDefaultDescription
textstring’Heading’Main heading text.
levelselect’h2’Heading level h1 to h6; legacy numeric 1 to 6 supported.
textAlignselect’center’Current alignment prop: left, center, right.
alignselect (legacy)fallback onlyBackward compatibility fallback when textAlign is not present.
colorstring’#333333’Heading text color.
fontFamilystringtheme defaultHeading font family.
subtitlestringOptional supporting subtitle text.
subtitleColorstring’#666666’Subtitle text color.
showSubtitlebooleanfalseControls subtitle visibility with content guard.
Toggles & colours

Make it yours

Use the builder property editor to tune visibility, alignment, typography, and hierarchy while keeping semantic heading order intact.

PropTypical valueWhat it controls
showSubtitletrue / falseShows or hides subtitle rendering.
color#333333Heading text color.
subtitleColor#666666Subtitle text color.
fontFamilyTheme fontHeading visual style and weight perception.
textAlignleft, center, rightAligns heading and subtitle block.
levelh1h6Semantic importance and default heading size mapping.
Tips

Common mistakes to avoid

Keep level order logical

Avoid jumping from h1 straight to h4 unless structure truly requires it. Consistent hierarchy improves readability and accessibility.

Use textAlign as the active prop

align is legacy fallback only. Set alignment with textAlign in new content so registry defaults stay predictable.

Subtitle needs both flag and content

Subtitle appears only when showSubtitle is enabled and subtitle is non-empty. Configure both if you expect visible subtitle text.

Sync visual changes across three places

If you alter sizes, weights, or supported props, update BuilderHeading.tsx, builderComponentRegistry.ts, and componentDimensions.ts together.