Tier 1 • Canonical Tag Dictionary & Schema Hub

The Story of declarative-tags

The foundational tag dictionary, schema taxonomy, and attribute validation blueprints that enforce type safety across all declarative JSON-to-DOM compilers.

Launch V1 Tags Studio →

The Ground Truth Dictionary

As a declarative system scales to dozens of components and assembly instructions, inconsistencies can arise: a developer might write class instead of attributes.class, or reference undefined string tokens.

declarative-tags is the authoritative dictionary that lists every allowed tag primitive, its mandatory attributes, and its semantic schema definition.

Schema Validation & Token Taxonomy

Compilers validate input tags against tags.json during build time:

  • allowsTextContent: Enforces whether an element accepts raw text or requires children.
  • allowsChildren: Prevents invalid nested DOM hierarchies (e.g. inside void elements like <col> or <input>).
  • allowedAttributes: Whitelists valid attributes (span, scope, type, value) to prevent invalid HTML emission.
  • childTags: Declares strict child hierarchies (e.g. <colgroup> only accepts <col>).

Contract Blueprint Example

{
  "colgroup": {
    "allowsTextContent": false,
    "allowsChildren": true,
    "allowedAttributes": ["span"],
    "childTags": ["col"]
  },
  "col": {
    "allowsTextContent": false,
    "allowsChildren": false,
    "allowedAttributes": ["span"]
  }
}
declarative-tags v1.0.0