Components/Typography
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/text
Text is a typography component used to create a wide variety of content including guidance, information, descriptions, labels and more.
<Heading/> instead.<Badge/> instead.Control the size of the text with the size prop. It supports 3 sizes:
medium is the default for all common cases of running text.small is for field labels and secondary content.tiny is for short messages of minor importance.Note: Use tiny in exceptional cases only, as it's hard to read, and not recommended for accessibility.
Control the weight of the text with the weight prop. It supports 3 weights:
bold emphasizes running text.normal is for form field values and button labels.thin is the default for all regular paragraphs.Control the color of text with the skin prop. It supports 6 skins:
standardpremiumsuccesserrordisabledprimarystandard skin can be placed on backgrounds with color. All other skins can be used only on white or gray backgrounds.
Invert text color so it can be used on a dark background with the light prop. It affects standard and disabled skins only.
Emphasize content hierarchy by setting running text priority to secondary. It applies lower contrast font color for standard skin text only.
Use a standard <ul> HTML tag to build an unordered list. Control its style with the listStyle prop. It supports 2 styles:
checkmarkcircleUse a standard <ol> HTML tag to build an ordered list. It accepts all default HTML types.
Handle text overflow by wrapping text, truncating it or doing both.
By default, text wraps into any number of lines. With ellipsis enabled, it will truncate to fit the width of the parent container. Specify maxLines to truncate text after a specified number of rows.
Always provide full text content to view:
showTooltip prop. Control tooltip style by passing all default <Tooltip/> properties via tooltipProps.Render text as a custom HTML tag by using the tagName prop.
Use a default <a> HTML tag to add an inline link to a sentence.
Use inline <Box/> to place buttons or other elements inline to text.
Toggle maxLines prop value to recreate 'Show more / Show less' behavior for text paragraphs.
This is a more accessible way to handle text overflow than using a tooltip only, since keyboard users can't access the complete text inside the tooltip.
For better readability and accessibility:
small or medium text size for all running text.All text should have a contrast ratio of at least 4.5
, compared to its background.For default running text:
standard and secondary skins on white and light backgrounds.light and light secondary on dark backgrounds.| Name | Type | Default | Description |
|---|---|---|---|
appendTo | null | Element | "window" | "scrollParent" | "viewport" | "parent" | Predicate | — | |
children | ReactNode | — | Renders any kind of content within a heading. Usually it's a text string. |
className | 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 | — | Applies id HTML attribute. |
interactive | boolean | — | |
light | boolean | — | Inverts text color so it can be used on dark backgrounds. |
listStyle | "circle" | "checkmark" | — | Sets list items style. |
maxLines | number | — | maxLines truncates text at a specific number of lines. |
maxWidth | string | number | string & {} | — | |
moveArrowTo | number | — | |
moveBy | Partial<{ x: number; y: number; }> | — | |
onClick | MouseEventHandler | — | Defines a callback function which is called when the text is clicked. |
onEllipsisStateChange | (isActive: boolean) => void | — | A callback fired when ellipsis state changes. |
onHide | () => void | — | |
onShow | () => void | — | |
overflowWrap | "normal" | "break-word" | "anywhere" | — | Sets "overflow-wrap" CSS property. Controls how text will behave upon overflowing parent component. |
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" | — | |
secondary | boolean | — | Sets text type to secondary. Affects font color only. |
showTooltip | boolean | true | Shows a tooltip with the full text when the text is truncated. |
size | "small" | "tiny" | "medium" | — | Controls the font size of the text. |
skin | "disabled" | "error" | "standard" | "premium" | "primary" | "success" | — | Controls the skin of the text. |
tagName | string | — | Defines a tag name that text should be rendered inside of (e.g., div, a, p). |
textAlign | "center" | "start" | — | |
tooltipProps | TooltipCommonProps | — | Allows to pass all common tooltip props. |
weight | "bold" | "normal" | "thin" | — | Controls the font weight of the text. |
widows | boolean | — | if true it will support widows in the text. |
zIndex | string & {} | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "auto" | number & {} | — |
Import the driver matching your test environment:
| Method | Description |
|---|---|
getTagName | Get the root element's tagName |
getText | Get text content (innerHTML) |
getSize | Get size |
getSkin | Get skin |
getWeight | Get weight |
getId | Get id |
isLight | Is light |
isSecondary | Is secondary |
isMasked | Checks if component has masking classNames |
isWidows | Checks if the text is using  |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
Last updated: 30 October 2026