Components/Typography
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/heading
Headings are titles for the main sections of a page. They help users understand what a page or section is about at a glance.
<Text/> instead.Control the size of a heading with the size prop.
extraLarge (heading tag – h1)large (h2)medium (h3)small (h4)tiny (h5)extraTiny (h6)Note: Building a page with proper heading structure is essential for accessibility. If the heading size has a tag that doesn't fit the structure, it should be overridden using the as prop (see the 'Custom HTML tag' section).
Invert the skin of a heading with the light prop. Use this skin for headings on backgrounds with colors or images.
By default, the header wraps if the text is too long, but can be truncated at the end of a sentence with the ellipsis prop.
Note: For accessibility, avoid using the ellipsis prop on headings. Keep all heading text visible on the screen at all times.
Render any kind of component within the <Heading> tag. This is most commonly used to display an alternative style of text inline with the title.
Render the heading as an HTML tag with the as prop.
<h1> to <h6> overrides the default size heading tag. This is useful for creating an accessible page heading structure without changing the design.<div> or <span> can be used when a heading shouldn't be perceived as a title.All attributes will be passed to the rendered HTML tag.
Use headings to emphasize main sections of a page and group related content together.
All pages must have a logical, descending heading structure that doesn't skip levels.
<h1> as the main page title, and the first page heading. It should describe what the page is about.<h1> per page.<h2> for sections of content and for modal headings.<h3> for subsections.When necessary, use the as prop to override the default heading tag without changing the design.
| Name | Type | Default | Description |
|---|---|---|---|
appearance | "H1" | "H2" | "H3" | "H4" | "H5" | "H6" | — | Sets the heading level, such as 'H1', which controls its visual style and HTML tag. It's ignored when size is provided. |
appendTo | null | Element | "window" | "scrollParent" | "viewport" | "parent" | Predicate | — | |
as | "object" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "head" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "label" | "legend" | "li" | "link" | "main" | "map" | "mark" | "menu" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "search" | "slot" | "script" | "section" | "select" | "small" | "source" | "span" | "strong" | "style" | "sub" | "summary" | "sup" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "title" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | — | Renders the heading as any other given HTML tag. |
children | ReactNode | — | Renders any kind of content within a heading. Usually it's a text string. |
dataHook | string | — | Applies a data-hook HTML attribute that can be used in the tests. |
disabled | boolean | — | |
ellipsis | boolean | — | When true, text that is longer than it's container will be truncated to a single line followed by ellipsis. Otherwise the text will break into several lines. |
enterDelay | number | — | |
exitDelay | number | — | |
fixed | boolean | — | |
flip | boolean | — | |
id | string | — | Identifies the element that labels or describes the text element. |
interactive | boolean | — | |
light | boolean | — | Invert heading style so it can be used on a dark or image background. |
maxLines | number | — | maxLines truncates text at a specific number of lines. |
maxWidth | string | number | string & {} | — | |
moveArrowTo | number | — | |
moveBy | Partial<{ x: number; y: number; }> | — | |
onEllipsisStateChange | (isActive: boolean) => void | — | A callback fired when ellipsis state changes. |
onHide | () => void | — | |
onShow | () => void | — | |
placement | "right" | "left" | "top" | "bottom" | "auto" | "auto-start" | "auto-end" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | — | |
showTooltip | boolean | true | Shows a tooltip with the full text when the text is truncated. |
size | "small" | "tiny" | "medium" | "large" | "extraLarge" | "extraTiny" | — | Controls the heading's visual size and HTML tag appearance. HTML tag can be overridden with 'as' prop. |
textAlign | "center" | "start" | — | |
zIndex | string & {} | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "auto" | number & {} | — |
Import the driver matching your test environment:
| Method | Description |
|---|---|
getText | Gets text content |
getAppearance | Gets heading appearance |
getSize | Gets heading size |
getTagName | Gets heading tag name |
isLight | Checks whether heading is light |
isMasked | Checks if heading has masking classNames |
getId | Gets heading id |
Last updated: 30 October 2026