Skip to content

Text

A run of text in one of the type styles; prefer dedicated components over inline markdown.

Group: Text · Kind: native · in the lite catalog

exampleHello, world!
variant · captionHello, world!
variant · mutedHello, world!
variant · leadHello, world!
variant · codeHello, world!
variant · labelHello, world!
variant · titleHello, world!
tone · neutralHello, world!
fontFamily · serifThe quick brown fox jumps over the lazy dog.

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-text on Web
exponential-ui-text on iOS
exponential-ui-text on Android
exponential-ui-text on Desktop
tone · primaryHello, world!
tone · successHello, world!
tone · warningHello, world!
tone · dangerHello, world!
tone · infoHello, world!
shimmerHello, world!
Prop Type Required Bindable Description
text string yes yes The text to show.
variant body | caption | muted | lead | code | label | title – – The type style. Default "body".
align start | center | end – – Horizontal alignment inside its box.
lines number – – Truncates to this many lines with an ellipsis.
tone neutral | primary | success | warning | danger | info – – A colour tone instead of the default foreground.
shimmer boolean – – Animates a highlight across the text while work runs. Default false.
live off | polite | assertive – – Announces changes (assertive interrupts). Default "off".
style style – – Extra Box styles for the text box.

None.

None.

none

The basic catalog’s Text renders as Text.

A native component: every renderer paints it directly.

Role: text

text (a live region when live is not off)

Not focusable; no keys.

Recipe parts: Text/root

Keyed by: variant tone :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover

Themes · Write a theme

Heading · Markdown · CodeBlock · Kbd · Label