Tier 2 • Pure HTML DOM Tag Specification Hub

The Story of declarative-spec

Pure, zero-dependency representations of HTML elements—decoupling tag names, CSS styling, and data interpolation tokens from JavaScript runtime frameworks.

Launch V5 Spec Studio (Latest) → Explore All Monaco Studios (v1–v5)
Interactive Workspaces

Monaco Studio Generations

Directly inspect specifications across every studio build.

What is a Tag Specification?

Before compiling an HTML element, every compiler needs to know three basic facts: What is the tag name? What attributes or CSS classes should it possess? And where does the child content go?

In typical component frameworks, this is written inside JSX or HTML template strings. In declarative-spec, every tag is stored as a pure, serializable JSON node in spec.json.

The Tag Spec Structure

Each node in spec.json contains an immutable declarative shape:

  • tag: The native HTML element name (table, th, td, button).
  • attributes: Standard serializable attributes such as class, data-role, type.
  • text / tokens: Placeholder tokens like ${columnName} that compilers replace with row data during table/card generation.
  • children: An array of initial nested child tag objects.

Blueprint Example

{
  "buildHeader": {
    "tag": "thead",
    "attributes": {
      "data-role": "headerRoot"
    },
    "children": []
  },
  "buildBodyCell": {
    "tag": "td",
    "attributes": {
      "data-role": "bodyCell",
      "class": "px-3 py-2 text-sm text-zinc-300"
    },
    "text": "${columnName}"
  }
}
declarative-spec v1.2.1