<crowdchange> element or programmatically through the CrowdChange JavaScript API.
Step 1 — Enable embedding for your campaign
In your CrowdChange admin, open the campaign and go to Setup → Embed. Enable the Embed option, save your settings, and copy the snippet provided there.Step 2 — Add the embed script
Include the embed script once per page, just before the closing</body> tag:
[your-site-domain] with your CrowdChange domain, for example site.crowdchange.co.
The script registers the <crowdchange> element, exposes the global CrowdChange object, and automatically initializes any widgets already on the page (and any added later).
Step 3 — Add a widget
There are two ways to add a widget.1. Using the <crowdchange> element
Place a <crowdchange> element anywhere on your page and configure it with attributes. This is the simplest approach and works without writing any JavaScript.
2. Using the JavaScript API
For programmatic control — for example, opening a donation form from your own button — useCrowdChange.createWidget(). It returns a widget instance you can act on; in popup mode, call expand() to open it.
For the fastest first open, create the widget once during page load and only call expand() inside your click handler:
<crowdchange> element (for example color-primary) and camelCase in the JavaScript API (for example colorPrimary).