Skip to main content
A Knit bundle is product sets, conditions, rewards, and the widget. The first three decide who qualifies and what is discounted. The widget is how that offer looks and behaves on the storefront. You write it in the same editor: the bundle’s Renderer (JS) and Stylings (CSS) assets, plus (optionally) a script you load on the storefront. You do not need repository access. See how the pieces connect for product sets, conditions, and rewards.

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

Two consequences:
  1. Your renderer runs many times — once on mount and again after every quantity, variant, or selection change. It must repaint from scratch each time.
  2. You never wire events. The runtime owns all interactivity, discovered through data attributes. That is why the renderer can replace innerHTML on every call without breaking clicks.