refract v0.1 · beta
Grammar reference / Full theme

A full theme

The shapes from every page above, nested into one RawTheme — registries, a property with all three axes, a derivation, an external token, and a recipe. Generic throughout ([bracketed] = author-chosen; "value" = a leaf).

theme.raw.ts
{
  breakpoints: { "[breakpoint name]": 0 },
  modes: [ "[mode name]" ],
  extends: { prefix: "[parent var prefix]" },

  "[subsystem]": {
    "[property name]": {
      base: "value", "[field name]": "value",
      variants: { "[variant name]": { ref: "[source token]", modifiers: [ { "[fn]": "[args]" } ] } },
      modes:    [ { mode: "[mode name]", base: "value" } ],
    },
    "[external property]": { external: "[token path]" },
    recipes: { "[group name]": { "[item name]": {
      "[recipe prop]": "[variant name]",
      states: [ { state: "[state name]", "[recipe prop]": "[variant name]" } ],
    } } },
  },

  components: { recipes: { "[group name]": { "[item name]": {
    "[subsystem]": "[group.item]", css: { "[css prop]": "value" },
  } } } },
}
Every key here is documented on the pages above — registries, values, properties, override sets, axes, and recipes. For task-oriented walkthroughs with concrete values, see Quickstart and the subsystem pages.
Technical documentation for @theme-registry/refract · all output is compiled client-side by the real library (CSS adapter). The chrome is theme-aware; the render panes carry each preset's own world. · MIT licensed.