refract v0.1 · beta
Reference / Comparison

How refract compares

refract is a theme compiler with a format-neutral Model — not a utility framework and not a CSS-in-JS runtime. It sits closest to DTCG token transformers (one source, many outputs), but it also models recipes and stores a reference graph — so override() is a delta-merge and diffTheme can show a change's blast radius before you apply it. Two questions place any tool: what does it commit your output to, and does it model the design system (recipes) or just the token values.

ToolGreat atHow refract differs
Tailwind CSS v4utility-first styling; CSS-first @theme config; superb iteration DXrefract isn't a utility framework — it emits your named tokens + recipes in any format, not utility classes. They compose: run refract's namespaced output alongside Tailwind (FAQ).
Panda CSSbuild-time, type-safe recipes → atomic CSS + generated JSa similar recipe idea, but Panda commits you to its own CSS/JS output and build step. refract's Model is format-neutral (one theme → CSS / styled-components / SCSS / JSON, pluggable) and carries a diffable reference graph.
vanilla-extractzero-runtime, TypeScript-authored static CSSCSS output only — no multi-format target, no DTCG interop, and no synthesized tonal ramps or override() delta-merge off a base.
Style Dictionarytransforms DTCG tokens into many platform formatsclosest in spirit (one source, many outputs) — but it's a value-level transformer: no recipes/composition, and no reference graph, so no plan-then-apply diff.
Terrazzo (ex-Cobalt)DTCG token tooling with a plugin ecosystem → many formatssame category as Style Dictionary; refract adds the design-system layer (recipes + composition) and the stored { ref, fn } graph behind override() / diffTheme.

The line that separates refract from every tool above: it stores a reference graph, not frozen values — every synthesized rung and variant is held as { ref, fn, arg } that points at its source. That's what makes override() re-derive a whole ramp from one base, and it's what lets diffTheme answer a question a token file can't: what will this change do — before I make it. Pair that with a format-neutral Model (the same theme emits CSS today and styled-components tomorrow) and an agent-native surface (an MCP server + installable skills), and the niche is specific: a theme compiler you don't get locked into. It doesn't replace your utility framework or your CSS-in-JS runtime — it owns the tokens-and-recipes layer beneath them.

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.