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 <tab> component defines an individual tab within a <tabs> container, including its label and content.
  • 🛠 Attributes
  • ✅ Allowed Content
  • 💡 Examples
  • 🧩 AI Interpretation Guidelines
Edit on GitHub
  1. Components
  2. Navigation

<tab> Component

The <tab> component defines an individual tab within a <tabs> container, including its label and content.

🛠 Attributes

Attribute
Type
Required
Description

id

string

Yes

Unique ID used to identify and activate the tab

label

string

Yes

Label displayed on the tab header

disabled

boolean

No

Disables interaction with this tab

✅ Allowed Content

Any content components or layouts.

💡 Examples

Tab item

<tab id="profile" label="Profile">Profile content here</tab>

🧩 AI Interpretation Guidelines

  • Render tab button with label and link it to the panel via id.

  • Hide tab content unless active.

  • Disable selection if disabled is true.


Tab structure clarification: Each <tab> element should contain its associated content as nested children. Only the content of the <tab> with an id matching the parent <tabs active="..."> value should be rendered or displayed.

Example with nested content:

<tabs active="profile">
  <tab id="overview" label="Overview">
    <text>This is the overview.</text>
  </tab>
  <tab id="profile" label="Profile">
    <form>
      <formField name="name" label="Name">
        <input type="text" bind="user.name"/>
      </formField>
    </form>
  </tab>
</tabs>
Previous<pagination> ComponentNext<tabs> Component

Last updated 2 months ago