Text

Components/Typography

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/text

Overview

Copy

Text is a typography component used to create a wide variety of content including guidance, information, descriptions, labels and more.

Do

  • Use it to display text paragraphs formed from a single sentence, or multiple sentences.
  • Use it to display form element values and labels.

Don't

  • Don't use it as a title for a section or a widget. Use <Heading/> instead.
  • Don't use it to highlight status, use <Badge/> instead.

Feature examples

Size

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.

Copy

Weight

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.
Copy

Skin

Control the color of text with the skin prop. It supports 6 skins:

  • standard
  • premium
  • success
  • error
  • disabled
  • primary

standard skin can be placed on backgrounds with color. All other skins can be used only on white or gray backgrounds.

Copy

Light

Invert text color so it can be used on a dark background with the light prop. It affects standard and disabled skins only.

Copy

Secondary

Emphasize content hierarchy by setting running text priority to secondary. It applies lower contrast font color for standard skin text only.

Copy

Unordered list

Use a standard <ul> HTML tag to build an unordered list. Control its style with the listStyle prop. It supports 2 styles:

  • checkmark
  • circle
Copy

Ordered list

Use a standard <ol> HTML tag to build an ordered list. It accepts all default HTML types.

Copy

Text overflow

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:

  • The most accessible pattern is to add a 'Show more' button which expands the full text.
  • Show full text on mouse hover with showTooltip prop. Control tooltip style by passing all default <Tooltip/> properties via tooltipProps.
Copy

Custom tag

Render text as a custom HTML tag by using the tagName prop.

Copy

Use a default <a> HTML tag to add an inline link to a sentence.

Copy

Common use case examples

Inline button

Use inline <Box/> to place buttons or other elements inline to text.

Copy

Show more

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.

Copy

Accessibility examples

Formatting

For better readability and accessibility:

  • Use either small or medium text size for all running text.
  • Keep text left-aligned (avoid center alignment, or don't overuse it).
  • Avoid lines longer than 75 characters in any language.
  • Divide long text into lists or short paragraphs.
Copy

Contrast

All text should have a contrast ratio of at least 4.5

, compared to its background.

For default running text:

  • Use standard and secondary skins on white and light backgrounds.
  • Use light and light secondary on dark backgrounds.
Copy

Code

Copy

Props

NameTypeDefaultDescription
appendTonull | Element | "window" | "scrollParent" | "viewport" | "parent" | Predicate—
childrenReactNode—Renders any kind of content within a heading. Usually it's a text string.
classNamestring—
dataHookstring—Applies a data-hook HTML attribute that can be used in the tests.
disabledboolean—
ellipsisboolean—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.
enterDelaynumber—
exitDelaynumber—
fixedboolean—
flipboolean—
idstring—Applies id HTML attribute.
interactiveboolean—
lightboolean—Inverts text color so it can be used on dark backgrounds.
listStyle"circle" | "checkmark"—Sets list items style.
maxLinesnumber—maxLines truncates text at a specific number of lines.
maxWidthstring | number | string & {}—
moveArrowTonumber—
moveByPartial<{ x: number; y: number; }>—
onClickMouseEventHandler—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"—
secondaryboolean—Sets text type to secondary. Affects font color only.
showTooltipbooleantrueShows 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.
tagNamestring—Defines a tag name that text should be rendered inside of (e.g., div, a, p).
textAlign"center" | "start"—
tooltipPropsTooltipCommonProps—Allows to pass all common tooltip props.
weight"bold" | "normal" | "thin"—Controls the font weight of the text.
widowsboolean—if true it will support widows in the text.
zIndexstring & {} | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "auto" | number & {}—

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
getTagNameGet the root element's tagName
getTextGet text content (innerHTML)
getSizeGet size
getSkinGet skin
getWeightGet weight
getIdGet id
isLightIs light
isSecondaryIs secondary
isMaskedChecks if component has masking classNames
isWidowsChecks if the text is using  
existsChecks whether the component found with the given data hook.
elementGets the component root element.
clickClicks on the component root element.
baseReturns UniDriver for the base element.

Changelog

  • 1.340.0 (2026-10-21) — maintenance release, no component-specific changes
  • 1.339.0 (2026-10-19) — maintenance release, no component-specific changes
  • 1.338.0 (2026-10-15) — maintenance release, no component-specific changes
  • 1.330.0 (2026-09-28) — maintenance release, no component-specific changes
  • 1.329.0 (2026-09-24) — maintenance release, no component-specific changes
  • 1.325.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.291.0 (2026-06-19) — maintenance release, no component-specific changes
  • 1.278.0 (2026-05-08) — maintenance release, no component-specific changes
  • 1.273.0 (2026-04-30) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.260.0 (2026-03-17) — maintenance release, no component-specific changes
  • 1.250.0 (2026-01-27) — maintenance release, no component-specific changes
  • 1.212.0 (2025-08-11) — maintenance release, no component-specific changes
  • 1.138.1 (2024-10-30) — maintenance release, no component-specific changes
  • 1.129.0 (2024-09-25) — maintenance release, no component-specific changes
  • 1.121.0 (2024-08-13) — feat: add overflowWrap property (#14031)
  • 1.116.0 (2024-07-22) — feat: add onEllipsisStateChange callback (#13963)
  • 1.115.0 (2024-07-17) — maintenance release, no component-specific changes
  • 1.109.2 (2024-06-17) — fix: fix typescript and proptypes clash (#13840)
  • 1.103.3 (2024-04-30) — maintenance release, no component-specific changes
  • 1.102.0 (2024-04-16) — maintenance release, no component-specific changes
  • 1.101.0 (2024-04-12) — maintenance release, no component-specific changes
  • 1.100.0 (2024-04-04) — maintenance release, no component-specific changes
  • 1.98.0 (2024-03-15) — maintenance release, no component-specific changes
  • 1.95.1 (2024-02-19) — maintenance release, no component-specific changes
  • 1.92.1 (2024-02-05) — maintenance release, no component-specific changes

Last updated: 30 October 2026

Did this help?