Skip to content

Text

Props ​

NameTypeDefaultDescription
typeTextType'body'Semantic text type. Determines default size, weight, and line-height. Optional: body, large, label, supporting, code, display-1, display-2, display-3.
sizeTextSize-Explicit font size override. Optional: sm, md, lg, xl.
colorTextColor'primary'Text color. Optional: primary, secondary, accent, inherit.
weightTextWeight-Font weight override. Optional: regular, medium, semibold, bold.
displayTextDisplay'inline'Display type: inline or block.
asTextAs'span'HTML element to render. Optional: span, p, div, label.
maxLinesnumber0Maximum lines before truncation. 0 means no truncation.

Native attributes ​

The root element is determined by as, defaulting to <span>.

The following are passed to the root element:

  • HTML attributes.
  • aria-* attributes.
  • data-* attributes.
  • class.
  • style.