Renderer function
Paint the widget HTML from bundle state.
Data attributes
The interaction contract the runtime wires after each render.
Styling
Scope CSS so it only touches this widget.
Plugin hooks
Gate, annotate, or observe add-to-cart.
Resolver stages
Wrap the PDP add-to-cart override pipeline.
Runtime API
Read state from outside the widget, plus debugging.
What you can extend
The renderer and CSS are per bundle. Plugins and resolvers are global to the page and see every bundle on it.
In the editor, product sets are what shoppers pick from. In the snapshot they appear as selectors:
How the page boots
- Your renderer runs many times — once on mount and again after every quantity, variant, or selection change. It must repaint from scratch each time.
- You never wire events. The runtime owns all interactivity, discovered through data attributes. That is why the renderer can replace
innerHTMLon every call without breaking clicks.