v0.0.14
components

Text

A typography component for rendering text with configurable size, weight, color, and alignment.

The quick brown fox jumps over the lazy dog.

API Reference

TextProps

Extends native HTML attributes inferred from the rendered element `as`.

PropertyTypeDefaultDescription
as
ElementTag
"span"HTML element to render as.
ref $bindable
HTMLElement
Reference to the rendered DOM element.
The element type is inferred from `as`.
color
union
Text color
size
union
"3"Font size
weight
union
"regular"Font weight
transform
union
Text transform
align
union
"start"Text alignment
wrap
union
Wrap text mode
underline
union
"none"Text decoration underline
truncate
boolean
falseTruncate text with ellipsis
muted
boolean
falseMute text (like disabled without aria-disabled)
disabled
boolean
falseDisable text
children
Snippet
Text content to render

Examples

Colors

default neutral blue green yellow orange red

Sizes

Sample size 1 Sample size 2 Sample size 3 Sample size 4 Sample size 5 Sample size 6 Sample size 7 Sample size 8 Sample size 9

States

Sample default Sample muted Sample disabled

Text align

Sample start Sample center Sample end

Text transform

Sample lowercase Sample uppercase Sample capitalize

Truncate

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tincidunt elit mattis sem mollis, sit amet dapibus arcu commodo. Morbi non aliquam sapien. Quisque pretium.

Weights

Sample light Sample regular Sample medium Sample bold