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 <formField> component wraps a single form input, along with its label, validation message, and optional helper text.
  • 🛠 Attributes
  • ✅ Allowed Content
  • 💡 Examples
  • 🧩 AI Interpretation Guidelines
Edit on GitHub
  1. Components
  2. Forms

<formField> Component

The <formField> component wraps a single form input, along with its label, validation message, and optional helper text.

🛠 Attributes

Attribute
Type
Required
Description

label

string

Yes

Label for the form field

name

string

Yes

Unique identifier for form binding

description

string

No

Optional helper or instruction text

required

boolean

No

Marks the field as required

ai-hint

string

No

Clarifies the expected input or purpose

✅ Allowed Content

A single child input, such as <input>, <textarea>, or <select>.

💡 Examples

Field with label

<formField name="email" label="Email address">
  <input type="email" bind="user.email"/>
</formField>

🧩 AI Interpretation Guidelines

  • Render label and description using accessibility best practices.

  • Bind input value to the name path or pass it to form logic.

  • Show validation or required indicators based on props.


Previous<form> ComponentNext<formGroup> Component

Last updated 2 months ago