LogoLogo
  • What is UDML?
  • Document structure
    • <components>
    • <imports>
    • <instructions>
    • <meta>
    • <styles>
    • <tokens>
    • <mappings>
    • <screens>
  • Directives
    • ai-hint
    • <data> Directive Specification
    • <interaction> Directive
    • <layer> Directive
    • <repeat> Directive
    • <responsive>
    • selection
    • <tracking> Directive
  • Components
    • Layout
      • <accordion> Component
      • <box> Component
      • <column> Component
      • <divider>
      • <grid> Component
      • <row> Component
    • Navigation
      • <breadcrumbs> Component
      • <pagination> Component
      • <tab> Component
      • <tabs> Component
    • Text & Display
      • <avatar>
      • <heading>
      • <icon>
      • <image>
      • <label>
      • <text>
      • <video>
    • Controls & Input
      • <button>
      • <checkbox>
      • <input> Component
      • <radio>
      • <select>
      • <slider>
      • <stepper>
      • <switch>
      • <textarea>
    • Forms
      • <form> Component
      • <formField> Component
      • <formGroup> Component
    • Data Collections
      • <dataColumn> Component
      • <dataTable> Component
      • <list> Component
      • <timeline> Component
      • <treeView> Component
    • Data Visualization
      • <chart> Component
      • <summary> Component
    • Modals
      • <dialog> Component
      • <modal> Component
      • <popover> Component
      • <toast> Component
      • <tooltip> Component
  • Prompting Guides
    • Prompting AI Developer Tools with UDML
    • Working with UDML in an Existing Codebase
  • Contributing to UDML
Powered by GitBook
On this page
  • The <text> component renders inline or block text content. It supports styling and semantic variants for body copy, labels, metadata, and headings.
  • 🛠 Attributes
  • ✅ Allowed Content
  • 💡 Examples
  • 🧩 AI Interpretation Guidelines
Edit on GitHub
  1. Components
  2. Text & Display

<text>

The <text> component renders inline or block text content. It supports styling and semantic variants for body copy, labels, metadata, and headings.

🛠 Attributes

Attribute
Type
Required
Description

variant

string

No

Semantic role (e.g., title, body, caption, meta)

size

string

No

Font size token (e.g., sm, md, xl)

weight

string

No

light, normal, bold

color

string

No

Text color or token

align

string

No

left, center, right

truncate

boolean

No

If true, text is truncated with an ellipsis

textStyle

string

No

Reference to named text style

ai-hint

string

No

Semantic description for ambiguous or dynamic content

✅ Allowed Content

Plain text or binding.

💡 Examples

Body text

<text size="md" color="muted">This is a paragraph.</text>

Heading

<text variant="title" weight="bold">Dashboard</text>

🧩 AI Interpretation Guidelines

  • Use variant or textStyle to determine semantics and styling.

  • Resolve truncate and layout-related attributes for overflow control.

  • Use ai-hint to clarify purpose or data intent.


Previous<label>Next<video>

Last updated 2 months ago