A framework built for editing
SigmaUI is a UI framework designed for visual editing and AI editing from the start. Components, layout intent and editing operations share one validated document.
Try the editing contract
One document. Visual and agent operations share the same engine.
Inspect layout and slots
{
"revision": 0,
"layout": {
"version": 1,
"kind": "split",
"proportions": [
40,
60
],
"collapseBelow": 760,
"order": [
"content",
"media",
"actions"
]
},
"slots": {
"content": [
"hero-copy"
],
"media": [
"hero-image"
],
"actions": [
"shop-button"
]
},
"semantic": {
"surface": "plain",
"spacing": "comfortable",
"width": "content",
"emphasis": "primary"
}
}Six framework responsibilities
Core owns documents, contracts, operations and migrations. Layout owns Stack, Row, Split, Grid and Mosaic intent. Theme resolves semantic choices. React renders instances. Editor provides direct manipulation. Agent exposes descriptions and validated proposals. New @sigmaui/layout, @sigmaui/theme and @sigmaui/agent packages preserve the existing themes and ai package APIs.
Definitions and instances
Trusted TypeScript definitions declare named slots, allowed child types, layouts, responsive intent, theme/data bindings, constraints and accessible behavior. Instances store stable IDs, props, child ownership, versioned layout and direct-child slot references. Documents cannot register code or grant authority.
import { createFrameworkDocument, defineComponent } from "@sigmaui/core";
const document = createFrameworkDocument("MarketingHero");
// Inspect document.nodes[0].layout and .slots; edit with operations.The same edit, from either interface
Dragging the Studio split divider and an agent-proposed layout.setProportions batch use the same validation, constraints, history and CSS compiler. The mock above proves the operation flow without claiming a connected live model.
[{ kind: "layout.setProportions", id: "hero-primary", value: [35, 65] },
{ kind: "layout.setCollapse", id: "hero-primary", below: 760, order: ["content", "media", "actions"] }]Legacy document compatibility
Schema-1 documents remain supported without conversion. Layout trees have their own version 1. migrateLayoutTree is an explicit adapter for existing Stack, Flex, Grid, ResponsiveColumns and SplitLayout nodes. It preserves IDs, content, bindings and precise overrides. Unsupported versions fail before replacing the original.
Semantic choices and precise overrides
Use surface, spacing, width and emphasis choices to inherit centrally resolved tokens. Precise styles remain separately stored and visible in the inspector. Explicit gap overrides take precedence over inherited spacing.
Compiled deployment and editable source
A compiled site can run without Studio or AI. A reusable source export contains JSX, scoped CSS, uploaded assets and editable project JSON, and uses the SigmaUI runtime. CLI source copying gives developers the reviewed implementation modules. Browser-delivered code remains inspectable. The public @sigma-ai/ui@0.2.0 runtime is MIT-licensed. Internal workspace/editor/agent tooling remains separate from the consumer package.