refract v0.1 · beta
Getting started / Playground

Playground

Edit a RawTheme on the left; it compiles in your browser as you type, and the preview and emitted CSS update live. This is the real library — the same createTheme that drives every panel on this site.

RawTheme (JSON)
Preview
Emitted theme.css

            
JSON forms only here — the one thing you can't express is a function-valued field (e.g. a custom type-scale algorithm), which needs a real .ts theme. Everything else is live: change brand.base and the tonal steps re-synthesize, edit a recipe and the class re-emits, add a states.hover and hover the preview. Note a component's css delta is literal-first — a bare string is a raw CSS value; mark a token with the JSON-safe { "ref": "…" } object (the ref() helper's data form).
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.