Canvas & Document Projections
Two complementary visual and textual projections over a single underlying UXDL project model.
Dual Projections Philosophy
UXDL adheres to the principle of 'Canvas first, not canvas only.' Canvas and Document views are not separate documents; they are two synchronous projections over the same canonical UXDL behavior graph.
Canvas View (Spatial Graph)
Canvas View presents screens as spatial graph cards, states as variant tags, actions as handles, and relations as directed arrows. It is optimized for visual overview, architecture reviews, and spatial flow comprehension.
Document View (Structured Text)
Document View presents the specification as a structured, readable document outlining metadata, requirements, and acceptance criteria. It is optimized for focused textual editing, PRD handoffs, and reading open metadata.
Bidirectional Synchronization
Modifications made in Canvas view update the underlying project AST instantly, which immediately updates Document view and Source YAML view. There is zero drift between visual and textual representations.