KlaydDocumentation

Canonical document

A versioned source of truth.

Klayd stores projects as canonical component documents so editing, review, migration, and framework export operate on the same lossless representation.

Document responsibilities

  • Stable component and element identities.
  • Typed component family, props, children, and semantic metadata.
  • States, sizes, variants, and selectable sub-elements.
  • Theme references and explicit style overrides.
  • Schema version and migration provenance.
{
  "schemaVersion": 1,
  "project": { "id": "project-id", "name": "Product UI" },
  "components": [
    {
      "id": "button-primary",
      "type": "Button",
      "name": "PrimaryButton",
      "props": {},
      "children": []
    }
  ]
}
Adapters preserve existing projects.

Legacy project payloads are normalized into the canonical document before use. Exporters should consume the canonical model rather than reading storage-specific shapes.