Reach for an app block
The merchant should configure it without code · you need it in a product card · you want styling managed from the theme editor.
Every Live Component can be placed two ways. They render the same component from the same data — the difference is who places it, how it’s configured, and where it’s allowed to go.
<dkl-*> element written directly into your theme’s
Liquid. Configured with data-* attributes and --dkl-* CSS. For developers
customizing a theme by hand. (These are labelled “Web Components” on each component page.)| App block | Web Component | |
|---|---|---|
| Added by | Theme editor (drag-and-drop) | Hand-written in theme Liquid/HTML |
| Configuration | Editor settings panel | data-* attributes |
| Styling | Editor pickers (colours, spacing, fonts) | --dkl-* CSS styling tokens |
| Which discount | The block’s Discount picker | data-discount-id attribute |
| Product cards / collection grids | ✅ Supported | ❌ Product-page only |
| Needs the app embed | ✅ Yes | ✅ Yes |
| No-flicker render | ✅ Inline server render | ✅ From a head carrier |
| Best for | Merchants, no code | Developers, full control |
An app block is a theme block you add in the editor — DK: Price, DK: Volume Groups, DK: Discount Badge, or DK: Order Goal. Drop it into a section or product-card slot, and configure it entirely through the editor’s settings panel.
Online Store → Themes → Customize → (add block) → DK: PriceWhat an app block does for you:
<style> rule the block emits,
so styling lives in the theme editor.<head> context to pre-stage a carrier from.Use an app block when a merchant should be able to place and style the component without touching code, or whenever you need it inside a product card.
A web component is the <dkl-*> web component written straight into your theme’s
markup:
<dkl-price></dkl-price>By default, a web component needs zero attributes — the page’s primary product is the
implicit default, and the tag clones a pre-staged carrier (markup, styling, and data-*
values) before first paint. Configure it with data-* attributes and style it with
--dkl-* CSS:
<dkl-price data-show-savings="true" style="--dkl-price-savings-background:#111; --dkl-price-savings-color:#fff"></dkl-price>What to know about web components:
data-discount-id (the metaobject handle; the
discount- prefix is optional). Place one tag per discount to show several.--dkl-* tokens in your own CSS — a tag has no block context, so there’s
no editor panel. Set the tokens on :root, the embed’s Custom CSS, an inline style, or
any ancestor. The defaults match the app block exactly, so an unstyled tag looks identical
to a default block.data-update-price-on-change="true" /
data-sync-with-quantity="true"); any attribute you set wins over the carrier’s.Use a web component when you’re editing the theme directly and want precise control over placement, attributes, and CSS.
Reach for an app block
The merchant should configure it without code · you need it in a product card · you want styling managed from the theme editor.
Reach for a web component
You’re editing theme Liquid directly · you want exact control over placement and
data-* · you’re styling with --dkl-* CSS · you need several discounts placed by hand.