Text

Displays a basic text primitive.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.
PropTypeDefault
as"span" | "div" | "p""span"
color"gray" | "purple" | "blue" | "green" | "yellow" | "red"
alignResponsive<"left" | "center" | "right">
sizeResponsive<"1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9">
trimResponsive<"normal" | "start" | "end" | "both"
weightResponsive<"normal" | "bold">
highContrastboolean

This component is based on the span element and supports common margin props m, mx, my, ml, mr, mt, mb. View source

Use the as prop to render text as a div or paragraph. This prop is purely semantic and does not change the visual appearance of the text.

This is a span.
This is a div.

This is a paragraph.

Use the color prop to control the color of the text. The colors are accessible over the canvas color and over steps 1 and 2 of the color scales.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Use the highContrast prop to use the highest contrast variant of the text color.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Use the align prop to set text alignment. You can change the alignment across breakpoints using the object syntax.

Left-aligned
Center-aligned
Right-aligned

Use the size prop to control the size of the text. The prop also provides correct line height and corrective letter spacing – as text size increases, the relative line height and letter spacing decrease.

You can change the size across breakpoints using the object syntax.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Sizes 2 – 4 are designed to work well for long-form content.

The goal of typography is to relate font size, line height, and line width in a proportional way that maximizes beauty and makes reading easier and more pleasant. The question is: What proportion(s) will give us the best results? The golden ratio is often observed in nature where beauty and utility intersect; perhaps we can use this “divine” proportion to enhance these attributes in our typography.

The goal of typography is to relate font size, line height, and line width in a proportional way that maximizes beauty and makes reading easier and more pleasant. The question is: What proportion(s) will give us the best results? The golden ratio is often observed in nature where beauty and utility intersect; perhaps we can use this “divine” proportion to enhance these attributes in our typography.

The goal of typography is to relate font size, line height, and line width in a proportional way that maximizes beauty and makes reading easier and more pleasant. The question is: What proportion(s) will give us the best results? The golden ratio is often observed in nature where beauty and utility intersect; perhaps we can use this “divine” proportion to enhance these attributes in our typography.

Sizes 1 – 3 are designed to work well for UI labels.

Quick LookThird-party extensions
Quick LookThird-party extensions
Quick LookThird-party extensions
Quick LookThird-party extensions

Use the trim prop to trim the leading space at the start, end, or both sides of the text box. You can change the leading trim across breakpoints using the object syntax.

The prop works similarly to the upcoming half-leading control spec, but uses a common negative margin workaround under the hood for cross-browser support.

Without trimWith trim

Trimming the leading is useful when dialing in vertical spacing in cards or other “boxy” components. Otherwise, the card padding looks larger on top and bottom than on the sides.

Without trim

The goal of typography is to relate font size, line height, and line width in a proportional way that maximizes beauty and makes reading easier and more pleasant.

With trim

The goal of typography is to relate font size, line height, and line width in a proportional way that maximizes beauty and makes reading easier and more pleasant.

Use the weight prop to set the weight of the text. You can change the weight across breakpoints using the object syntax.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Ambiguous voice of a heart which prefers kiwi bowls to a zephyr.

Text component works in tandem with WorkDS formatting components.

Look, such a helpful link, an italic emphasis, a piece of computer code, and even a hotkey combination ⇧⌘A within the text.