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 <tabs> component groups content under multiple tabs. Use nested <tab> elements for each tab panel.
  • 🛠 Attributes
  • ✅ Allowed Content
  • 💡 Examples
  • 🧩 AI Interpretation Guidelines
Edit on GitHub
  1. Components
  2. Navigation

<tabs> Component

The <tabs> component groups content under multiple tabs. Use nested <tab> elements for each tab panel.

🛠 Attributes

Attribute
Type
Required
Description

active

string

No

The id of the currently selected tab

align

string

No

start, center, or end

orientation

string

No

horizontal (default) or vertical

✅ Allowed Content

children only.

💡 Examples

Horizontal tabs

<tabs active="overview">
  <tab id="overview" label="Overview">...</tab>
  <tab id="settings" label="Settings">...</tab>
</tabs>

🧩 AI Interpretation Guidelines

  • Render as tab list + tab panels.

  • Match active to child tab id.

  • Support keyboard navigation and accessibility roles.


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<tab> ComponentNextText & Display

Last updated 2 months ago