Skip to content

About

Tune a React and Tailwind v4 theme live with a floating visual editor.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Theme Editor app icon

Theme Editor

Tune a React and Tailwind v4 theme live with a floating visual editor.
Development only, and it exports your theme as CSS or JSON tokens.

React TypeScript Tailwind

Install

Theme Editor open beside a demo project tracker while the accent color, font set, display size, corner radii and control height change one at a time

Theme Editor adds an inspector to a running React app, for designers and developers who want to tune a visual system on the real product instead of in a mockup.

  • Adjust color, type, surfaces, shape, states, elevation and motion while the app runs.
  • Generate a whole theme or shuffle one part of it, then undo or compare with the original.
  • The export is plain CSS variables or JSON.

How it works

Theme Editor ships as a Codex skill. In a React and Tailwind v4 project, ask for it:

Use $theme-editor to add the Theme Editor to this project.

The skill reads your real CSS variables, copies in the editor, and connects only the controls your components actually use, through a small adapter that keeps your own token names. In development a floating button opens the inspector, with a section for each kind of token your project has.

Two views of the inspector: theme directions and typography on the left, interaction states and motion with their previews on the right

The inspector has its own colors and fonts, so it reads the same on a light or a dark app and does not change while you restyle what is under it. A contrast list measures your text pairs as the browser renders them. When a direction is worth keeping, copy it from Export. This is the theme the demo ends on:

{
  "--primary": "#C2703A",
  "--theme-accent-text": "#6E3F21",
  "--primary-foreground": "#0A0A0B",
  "--theme-accent-container": "color-mix(in srgb, var(--primary) 14%, var(--background))",
  "--font-sans": "'Source Code Pro', monospace",
  "--font-heading": "'Lora', serif",
  "--font-display-size-adjust": "0.650",
  "--radius-md": "20px",
  "--radius": "22px",
  "--control-height": "40px"
}

Ask the skill to apply an export and it writes the values into your stylesheet. It can also upgrade an older install or remove the editor. What the inspector includes and how the skill installs are in docs/how-it-works.md.

Privacy

Your changes are saved in the browser's local storage, one set per project. Fonts are requested from Google Fonts: the families your tokens name and any you try. The skill wires the editor to render only in development.

Limits

It needs components that read semantic CSS variables, the pattern Tailwind v4's @theme inline sets up. Hard-coded colors and sizes stay out of reach until the skill wires them to a token. The inspector is built for desktop screens. Fonts you try come through the editor's own loader, so a theme you keep needs its fonts loaded the way your app already loads them.

Install

curl -fsSL https://raw.githubusercontent.com/madebysan/theme-editor/main/install.sh | bash

It needs git, and installs to ~/.agents/skills/theme-editor (set THEME_EDITOR_SKILLS_DIR for another folder). Running it again replaces the skill and keeps the previous copy in .theme-editor-backups. Start a new Codex task and invoke $theme-editor in your project. To work on the editor itself, see local development. Product principles are in DESIGN.md.


MIT

Made by santiagoalonso.com

About

Tune a React and Tailwind v4 theme live with a floating visual editor.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages