comfyui-react-widget
Skill by yolain
Explains how to build React widgets for ComfyUI custom nodes using the createReactWidget factory. Covers two-way data binding, render synchronization, and extension registration. Written for developers who build ComfyUI custom nodes.
Install comfyui-react-widget
Built from the published package, never by AI.
git clone --depth 1 https://github.com/yolain/ComfyUI-Easy-Media /tmp/ComfyUI-Easy-Media && mkdir -p ~/.claude/skills && cp -r /tmp/ComfyUI-Easy-Media/.claude/skills/comfyui-react-widget ~/.claude/skills/comfyui-react-widgetRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/yolain/ComfyUI-Easy-Media /tmp/ComfyUI-Easy-Media && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/ComfyUI-Easy-Media/.claude/skills/comfyui-react-widget ~/.gemini/antigravity-cli/skills/comfyui-react-widgetAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install comfyui-react-widget in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill documents how to mount React components as ComfyUI DOM widgets. The createReactWidget factory creates a React root inside a container added to the node with addDOMWidget. The current value is stored as a JSON string, and the factory handles getValue, setValue and serializeValue so ComfyUI can save, load and build API payloads.
The skill gives a full flow: write the component, export it, register the widget type in getCustomWidgets, and declare a matching input type in the Python node. It also covers rules such as calling render() after onChange, reading main data from the value prop instead of useState, and matching the type name between TypeScript and Python. It is aimed at developers building or debugging React-based widgets for ComfyUI.
Written from the project's SKILL.md and checked against it.
What it can do
- createReactWidget wrappingWraps a React component so it mounts as a ComfyUI DOM widget.
- Two-way data bindingShows how user edits and external setValue calls keep the node value in sync.
- Extension registrationShows how to register widget types through getCustomWidgets in registerExtension.
- Python input type setupShows how to declare the matching custom input type in INPUT_TYPES.
- Component conventionsLists rules such as deriving main data from the value prop and defensive parsing.
- Localization guidanceDescribes message catalogs and LocaleContext for widget text.
- Debugging checklistMaps common symptoms, such as stale renders or zero height, to likely causes and fixes.
What you need
- ComfyUI custom node project
- Python for the node INPUT_TYPES definition
- Bun bundler for code splitting
- React and TypeScript
Try asking
- Create a React widget for ComfyUI that edits a list of color presets.
- Why does my ComfyUI React widget not update after a click?
- Register a new custom widget type in getCustomWidgets for my node.
Good to know
- The main data must be read from the value prop, not React state.
- Every onChange call must be followed by render().
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/comfyui-react-widget/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to comfyui-react-widget
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
comfyui-react-widget: common questions
Why does my ComfyUI React widget not update after user input?
The source says onChange must call render() after updating currentValue. Without it, the React component does not receive the new props.
Where should widget data be stored in a ComfyUI React widget?
The source says main data should be derived from the value prop. useState is only for temporary UI state such as draft input values.
How does the Python node connect to a React widget?
The Python INPUT_TYPES type string must exactly match the key returned by getCustomWidgets in the TypeScript entry point.
How do I install comfyui-react-widget?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is comfyui-react-widget free?
The code is published under the GPL-3.0 licence. The service it connects to may have its own pricing.
Is comfyui-react-widget safe to use?
It scores 71 of 100. Grades: maintenance A, licence C, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to comfyui-react-widget?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
