Skip to main content

Text

Displays text; supports bindings, font size, font weight, color, line clamping, and alignment.

Signature

Content syntax and attribute-element syntax:

Attributes

Runtime behavior

  • Renders as a block-level span, keeping line breaks and wrapping automatically.
  • Value is interpolated before display; an unloaded binding renders as an empty string.
  • Clamp uses CSS line-clamp and requires Value to be plain text.
  • Sizes map to Tailwind text-xs … text-2xl.

Example

Gotchas

  • Use Clamp to keep multi-line text in check, otherwise it stretches the card.
  • Color="Destructive" is for error messages; do not use it for body text.
  • {} in text is treated as a binding; to show literal braces, split them up or use a resource.