Heading
Renders hierarchical titles to communicate the structure and organization of page content. Heading levels adjust automatically based on nesting within parent Section components, ensuring a meaningful and accessible page outline.
Anchor to propertiesProperties
- Anchor to accessibilityRoleaccessibilityRole"heading" | ExtractStrict<AccessibilityRole, "presentation" | "none">Default: 'heading'
Sets the semantic meaning of the component’s content. When set, the role will be used by assistive technologies to help users navigate the page.
heading
: defines the element as a heading to a page or section.presentation
: the heading level will be stripped, and will prevent the element’s implicit ARIA semantics from being exposed to the accessibility tree.none
: a synonym for thepresentation
role.
- string
A unique identifier for the element.
HeadingProps
- accessibilityRole
Sets the semantic meaning of the component’s content. When set, the role will be used by assistive technologies to help users navigate the page. - `heading`: defines the element as a heading to a page or section. - `presentation`: the heading level will be stripped, and will prevent the element’s implicit ARIA semantics from being exposed to the accessibility tree. - `none`: a synonym for the `presentation` role.
"heading" | ExtractStrict<AccessibilityRole, "presentation" | "none">
- id
A unique identifier for the element.
string
export interface HeadingProps extends Pick<HeadingProps$1, 'accessibilityRole' | 'id'> {
}
ExtractStrict
Like `Extract`, but ensures that the extracted type is a strict subtype of the input type.
AccessibilityRole
"main" | "header" | "footer" | "section" | "aside" | "navigation" | "ordered-list" | "list-item" | "list-item-separator" | "unordered-list" | "separator" | "status" | "alert" | "generic" | "presentation" | "none"
Code
examples
Code
<s-heading>Contact</s-heading>
Preview

Anchor to useful-forUseful for
- Creating titles and subtitles for your content that are consistent across your app.
- Helping users with visual impairments navigate through content effectively using assistive technologies like screen readers.
Anchor to considerationsConsiderations
- The level of the heading is automatically determined by how deeply it's nested inside other components, starting from h2.
- Default to using the
heading
property ins-section
. Thes-heading
component should only be used if you need to implement a custom layout for your heading in the UI.
Anchor to best-practicesBest practices
- Use short headings to make your content scannable.
- Use plain and clear terms.
- Don't use jargon or technical language.
- Don't use different terms to describe the same thing.
- Don't duplicate content.