Text
Props
| Name | Type | Default | Description |
|---|---|---|---|
type | TextType | 'body' | Semantic text type. Determines default size, weight, and line-height. Optional: body, large, label, supporting, code, display-1, display-2, display-3. |
size | TextSize | - | Explicit font size override. Optional: sm, md, lg, xl. |
color | TextColor | 'primary' | Text color. Optional: primary, secondary, accent, inherit. |
weight | TextWeight | - | Font weight override. Optional: regular, medium, semibold, bold. |
display | TextDisplay | 'inline' | Display type: inline or block. |
as | TextAs | 'span' | HTML element to render. Optional: span, p, div, label. |
maxLines | number | 0 | Maximum 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.