This repository contains a minimal, functional blueprint showing how to integrate React-based widgets with Elementor.
Features:
- Single React-based widget (
hello-widget) with two Elementor controls: text and styling (color + font-size) - Live settings synchronization in the editor via
widgetManagerandelementorhooks — updates applied without React remounts - Vite-based build producing
assets/js/main.jsandassets/css/style.css
Quickstart:
- cd into this folder and run
npm install. - Run
npm run buildornpm run watchto produceassets/files. - Run
npm run build:prodfor optimized build (no sourcemaps) - Run
npm run devfor local dev server (requires Vite config changes, according to your setup). - Activate the plugin in WordPress and add the "Hello (React) Widget" in Elementor.
Notes: This plugin is intentionally small — use it as a starting point and copy useful patterns back into your main plugin, or build on top of this codebase.
Use the documentation in docs/elementor-react-integration.md