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
  • 🧠 Purpose
  • 🛠 Syntax
  • 🔑 Child Tags
  • ✅ Example Use in Screens
  • 🧩 AI Interpretation Guidelines
Edit on GitHub
  1. Document structure

<components>

The <components> section defines custom reusable components made from UDML primitives. These are composable blocks with named <slot> placeholders for dynamic content.


🧠 Purpose

To support system design principles like reusability, consistency, and separation of concerns by enabling authors to define UI components once and use them anywhere.


🛠 Syntax

<components>
  <component name="UserCard">
    <card>
      <slot name="avatar"/>
      <slot name="name"/>
      <slot name="actions"/>
    </card>
  </component>
</components>

🔑 Child Tags

Tag
Required Attributes
Purpose

<component>

name

Defines the reusable block

<slot>

name

Declares a dynamic placeholder


✅ Example Use in Screens

<component is="UserCard">
  <avatar slot="avatar" src="user.png"/>
  <text slot="name">Jane Doe</text>
  <button slot="actions">View</button>
</component>

🧩 AI Interpretation Guidelines

  • Expand <component is="..."> blocks with the defined structure.

  • Replace <slot name="..."> with slotted content provided in use.

  • Preserve custom structure and style of the original definition.


PreviousDocument structureNext<imports>

Last updated 2 months ago