Components / Text

Text nativelite

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

A2UI basic
Text
Children
none
Loading the renderer…
Text rendered by the React renderer on Web
Web React
Text rendered by the SwiftUI renderer on iOS
iOS SwiftUI
Text rendered by the Compose renderer on Android
Android Compose
Text rendered by the gpui renderer on Desktop
Desktop gpui

View exponential-ui-text, painted by each native renderer.

variant · body
variant · caption
variant · muted
variant · lead
variant · code
variant · label
variant · title
tone · neutral
tone · primary
tone · success
tone · warning
tone · danger
tone · info
PropTypeDefaultDescription
textrequiredbindstring–The text to show.
variantbody | caption | muted | lead | code | label | title"body"The type style.
alignstart | center | end–Horizontal alignment inside its box.
linesnumber–Truncates to this many lines with an ellipsis.
toneneutral | primary | success | warning | danger | info–A colour tone instead of the default foreground.
liveoff | polite | assertive"off"Announces text changes to screen readers (assertive interrupts).
stylestyle–Extra Box styles for the text box.

No events, no slots. Children: none.

Role
text
Semantics
text (a live region when live is not off)

Not focusable; no keys.

Recipe parts
Text/root
Keyed by
varianttone:hover:pressed:focus:disabled:checked:open:selected:invalid:dragover

Themes · Write a theme