Custom Web Components on PDP — Tabs, Variant Descriptions & Sticky Add-to-Cart
WinSport Theme · Custom Elements · Pub/Sub Events · IntersectionObserver
Dawn’s architecture uses Custom Elements (Web Components) with a pub/sub event system for decoupled communication. Phase 7 adds three interactive components that follow this exact pattern — no jQuery, no frameworks, no global side effects. Each component self-registers, manages its own lifecycle, and conditionally loads only when its block exists.
Multiple content panels behind tab headers. Full ARIA support: role="tablist/tab/tabpanel", aria-selected, keyboard navigation with Arrow/Home/End keys.
Listens to variantChange via pub/sub. Shows variant-specific text (e.g. "Limited edition color") and hides others. Falls back to default message.
IntersectionObserver on the main ATC button. When it scrolls out of view, a fixed bottom bar slides up with product name, price, and buy button.
tabindex="-1"
PUB_SUB_EVENTS.variantChange[data-variant-id] to selected variant[data-variant-default] when no match
.is-visible class on scrollWinSport Theme · Phase 7 Complete · Dawn v15.4.1 · Shopify 2.0