Skip to main content

Configure the following properties on the Heading component.

string

A unique identifier for the element used for targeting with CSS, JavaScript, or accessibility features.


Anchor to Display hierarchical headingsDisplay hierarchical headings

Create hierarchical titles using a heading component that adjusts levels automatically based on nesting. This example shows a basic heading with automatic level management.

Display hierarchical headings

Create hierarchical titles using a heading component that adjusts levels automatically based on nesting. This example shows a basic heading with automatic level management.

Display hierarchical headings

<s-heading>Heading (H2)</s-heading>
<s-section>
<s-heading>Heading (H3)</s-heading>
<s-section>
<s-heading>Heading (H4)</s-heading>
</s-section>
</s-section>

  • Create logical hierarchy: Start with higher-level headings for main sections, nested headings for subsections. Nested sections automatically adjust heading levels.
  • Write specific headings: Avoid generic terms like "Details." Use specific descriptions like "Customer Contact Information" or "Transaction Summary."
  • Keep text concise: Headings don't truncate, so keep them brief enough to display across different screen sizes.

Was this page helpful?