<screens>
The <screens>
section defines the top-level visual structure of each screen in the application. Each <screen>
block is a single view or route, built from layouts and components.
🧠Purpose
To encapsulate and separate views in a multi-screen app, allowing AI tools to generate screens as files, components, or pages based on their names and content.
🛠Syntax
🔑 Required Attributes
<screen>
name
Unique screen/view identifier
🧩 AI Interpretation Guidelines
Treat each
<screen>
as a self-contained route or view.Use
name
to determine output file/component naming.Extract nested layouts and components to structure the rendered page.
🧩 Modal Screen Support
UDML supports defining reusable modals and overlays as special screen types.
✅ Usage
🔑 Rules
type="modal"
defines the screen as a modal overlay, not a full view.Modals can be reused across multiple flows by referencing the
name
.Useful for dialogs, confirmations, alerts, authentication popups, etc.
AI agents should not treat these as primary routes unless triggered contextually.
🧠AI Guidelines
Render
screen[type="modal"]
as an overlay or layer on top of the invoking screen.Trigger visibility using a state variable or interaction.
Treat modals as independently scoped UI units (like named components).
Last updated