Text

Beta notice: This page is being built.Edit on GitHub(opens in new tab)

Displays View text with Astryx's semantic typography, alignment, wrapping, and truncation controls.

longlink docs component "Text"

Example

Normal bold and italic text.

Properties

Text - Properties
childrenReactNode
Text content.
color"primary" | "secondary" | "disabled" | "placeholder" | "accent" | "inherit"
Text color; defaults to secondary for supporting text and primary otherwise.
type"code" | "inherit" | "body" | "large" | "label" | "supporting" | "display-1" | "display-2" | "display-3"
Theme text style, or inherit to match surrounding text.
size"4xs" | "3xs" | "2xs" | "xsm" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl"
Font size override for the selected text style.
weight"bold" | "normal" | "medium" | "semibold"
Font weight override.
display"inline" | "block"
Display type. Silently overridden to 'block' when maxLines > 0 or hasCapsize is true.
as"label" | "span" | "p" | "div" | "h1" | "h2" | "h3"
HTML element to render.
maxLinesnumber
Maximum visible lines before truncation; 0 disables truncation.
hasTruncateTooltipboolean | "start" | "end" | "above" | "below"
Enables, disables, or positions the tooltip for truncated text.
wordBreak"break-word" | "break-all"
Word breaking for truncated text.
textWrap"nowrap" | "wrap" | "balance" | "pretty"
Text wrapping behavior.
justify"start" | "center" | "end"
Text alignment (justification). Uses logical values (start/end) for i18n/RTL compatibility.
hasCapsizeboolean
Enable optical alignment using text-box-trim. Forces block display.
hasStrikethroughboolean
Apply strikethrough text decoration.
hasTabularNumbersboolean
Use tabular (monospace) numbers for aligned numeric data.