<dkl-*> web components that render discount UI
directly in your storefront — a volume picker, a
discount-aware price, a max-discount badge,
and an order-goal progress bar. They read the same
Discount Kit Live data you already sync to your storefront, are
server-rendered so they paint with no flicker, and theme entirely through
--dkl-* CSS styling tokens.
These components require the discounts they display to be tagged
dk:live and synced
to your storefront. See the Live introduction for how syncing works.Enable the ‘Discount Kit Live’ app embed
Every component depends on the Discount Kit Live app embed. Enable it once, per theme:
The embed loads the shared runtime (styles + behaviour) site-wide and pre-renders the
data each component needs. Without it enabled, the components have nothing to render
from.
The embed also exposes a Debug mode toggle and a Custom CSS field. Debug mode
logs both the standard storefront events and every Discount Kit Live component event
(mount/unmount, tier-change, price-change) to the browser console; Custom CSS is a
convenient place to set global
--dkl-* styling tokens.Two ways to place a component
Each component can be added either as a theme app block (configured in the theme editor) or as a web component (dropped straight into theme markup). They render identically — the same defaults back both paths.App blocks
Add DK: Price, DK: Volume Groups, etc. through the theme editor. Every
setting (colours, spacing, labels) is exposed in the editor — no code. This is the
right choice for most merchants, and the only way to render in product cards on
collection pages.
Web Components
Drop the element directly into your theme’s Liquid — e.g.
<dkl-price></dkl-price>.
On a product page it needs zero attributes: it renders from a pre-staged carrier
with no flicker. For developers customizing themes directly.Prerequisites
Beyond enabling the Discount Kit Live app embed and tagging your discountsdk:live, the
Live Components need one thing from your theme: support for Shopify’s
Standard Storefront Events.
The components react to shopper actions — selecting a variant, changing the cart — by listening
for these events, so your theme must publish them for the components to update in response:
shopify:product:selectdrives variant-aware updates:- the price re-prices on a variant change
- the volume picker re-calculates the selected tier on variant change
- the badge re-picks the best discount
shopify:cart:lines-updatedrives cart-level updates:- the order goal’s progress updates as the cart changes.
The components still render without the standard events — they’re server-rendered from their
carrier or app block, so they paint with no flicker regardless. They just won’t react to
variant or cart changes until your theme publishes the events.
Theming
All component styling is driven by--dkl-* CSS styling tokens — global brand tokens shared
by every component, plus per-component tokens for fine control. See
Styling for the full token reference, how to apply them, and how
to target structural elements.
The components
Discount Price
<dkl-price> — a theme-agnostic price that shows the discounted amount and a
struck-through original as tiers and variants change.Volume Picker
<dkl-volume-picker-radio-groups> — a PDP selector for volume/tiered discounts, one
radio card per tier.Discount Badge
<dkl-discount-badge> — a “Save up to 20%” / “Save up to $5.00” badge for products
and product cards.Order Goal
<dkl-order-goal> — a cart progress bar toward an order-goal discount’s spend tiers.