A development harness for the <shopify-checkout> web component. It imports
the same entry as published consumers (@shopify/checkout-kit, aliased to
../src/index.ts in dev), registers the custom element, and logs ec.*
events.
cd platforms/web
pnpm sampleVite serves at http://localhost:5173. The page has three panels:
- Options — form for
src,target(auto|popup),appearance(defaultstorefront|app:light|app:dark|app:automatic|storefront), anddebug, plus buttons foropen(),close(), andfocus(). - Demo Storefront — a mocked product card with Buy now calling
checkout.open(). The button stays disabled until a checkout URL is set. The collapsible readout showscheckout,error,target,appearance, anddebug. - Events — log of dispatched events with a JSON snapshot of state at fire time.
The element is mounted on <body>. For popup / auto, the visible UI is
mostly the overlay scrim while checkout is open in a separate window or tab.
pnpm sample:build # outputs to sample/dist/CI runs this on every PR (see .github/workflows/web.yml). The sample is not
published to npm (files allowlist in platforms/web/package.json).