Back to Overview
USING UXDLAvailable

Create a UXDL Project

How to set up single-file or multi-file UXDL projects for small features or enterprise SaaS suites.


Project Structure Strategy

Most projects should begin with the simplest structure that works. A single UXDL YAML file is fully valid and natively parsed by the editor. As application scope grows across multiple domain teams, split features into explicit feature modules declared inside uxdl.project.yaml.

Single-File Projects

A single .uxdl.yaml file contains all actors, screens, states, actions, relations, and slices in one document. It is ideal for feature specs, single user flows, and lightweight prototypes.

Multi-File Projects Profile

For large enterprise SaaS platforms, create a root uxdl.project.yaml manifest pointing to module files:

YAML
uxdl: "0.1"
project:
id: saas_platform
name: Enterprise SaaS Engine
modules:
- id: auth
path: flows/auth.uxdl.yaml
- id: billing
path: flows/billing.uxdl.yaml
- id: dashboard
path: flows/dashboard.uxdl.yaml

Module Ownership & Address Resolution

UXDL enforces strict single-module ownership to prevent address collision:

  • One Owner Rule — Every screen ID, actor ID, or slice ID MUST be defined in exactly one module. Duplicate ownership across modules is a structural error.
  • Global Reference Resolution — Relations keep short screen IDs across modules. Moving an element to a different module file does not change its global UXDL address.
  • Portable Export — The UXDL editor composes a single-file composed.uxdl.yaml artifact for tools or AI agents that consume single documents.