Skip to main content

Text

The Text Primitive on Page

The Text primitive displays text information on the page

Part of the text can be converted into a Link primitive or Span. Link and Span within Text can be styled separately from Text.

Available props#

Prop nameDescription
overflow-wrapSets whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box
word-breakSets whether line breaks appear wherever the text would otherwise overflow its content box
white-spaceSets how white space inside an element is handled
text-indentSets the length of empty space (indentation) that is put before lines of text in a block
text-overflowSets how hidden overflow content is signaled to users
hyphensspecifies how words should be hyphenated when text wraps across multiple lines
asHTML element that will be used in the document: h1, h2, h3, h4, h5, h6, p, div