#212·tweakcn

Add a react component for the editor.

Author: AnderssxnCreated Aug 25, 2025Updated Mar 8, 2026
Labelsenhancement

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Im doing multi-tenant platform that requires creating themes for users websites. Currently i just have a code editor for users to write their own css but it would be cool to have a tweakcn editor built-in, since im already suggesting them to go the website and generate their theme there.

Describe the solution you'd like A clear and concise description of what you want to happen.

Implementation could be something like this. No need for AI generated themes or maybe use the editorOptions for selecting what values would be available for editing.

javascript
"use client";
import { useState } from "react";
import { ThemeEditor} from "@tweakcn/react";

export default function CustomEditor() {
    const editorOptions = {...} // default options
    const [theme, setTheme] = useState<string | null>(null); // css or json value for the tweakcn theme
    const handleThemeChange = (theme: string | null) => {
        setTheme(theme);
    }
  return <ThemeEditor theme={theme} onThemeChange={handleThemeChange} options={editorOptions}/>;
};

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

i was going to use https://github.com/programming-with-ia/shadcn-theme-editor but its not what i was aiming for.

Additional context Add any other context or screenshots about the feature request here.