Skip to main content
This is the shared reference for <dkl-volume-picker-radio-groups> — the data-* attributes that drive its behaviour, the --dkl-* tokens that style it, and the CSS parts and light-DOM classes you can target. The app block settings map onto these; on a web component you set them directly.
Using this reference with the app blockWhen you place the DK: Volume Groups app block, it renders its own <dkl-volume-picker-radio-groups> and writes these values for you — so what applies depends on the kind of override:Data attributes - No: The block sets every data-* itself, from its App block settings and the resolved discount. Adding data-* to your own markup has no effect on a block instance; they’re the configuration surface for the web component only. To change block behaviour, use its settings.CSS styling tokens — Yes: They’re CSS custom properties that inherit through the shadow boundary, so they style a block exactly like a web component. The block’s colour / radius / spacing pickers just write the matching setting-backed tokens into a scoped <style> rule for you. Any token not exposed as a setting (e.g. --dkl-vp-legend-spacing, --dkl-vp-list-gap) you can still set yourself from your own CSS — :root, the embed’s Custom CSS field, or a rule targeting the block.CSS parts and classes — Yes: The shadow DOM and light-DOM markup are identical, so ::part() and the .dkl-volume-picker__* classes work the same on a block or a web component.
Token precedence. A token the block writes from a chosen setting is scoped to the block’s id (#dkl-vp- {block.id}), which is more specific than a :root rule — so to override that token, either change the editor setting or match the specificity (target the block element). Tokens the block leaves unset fall back to your CSS or the built-in default as normal.

Data attributes

Set as data-* on the host. On a web component the carrier supplies the data attributes; the behaviour toggles default off.
metaobject handle
default:"carrier (first eligible)"
Which discount’s carrier to clone. The discount- prefix is optional; an attribute-less tag uses the default (first eligible).
"cards" | "mini-buttons"
default:"cards"
Presentation: stacked cards, or a compact button grid (the per-tier price line is hidden).
string
default:"carrier (shop.money_format)"
Money format for JS-reformatted prices.
string
default:"null"
Instance id; disambiguates multiple widgets.
"true" | "false"
default:"false"
Whether selecting a tier updates the displayed price — the theme’s native price element and the <dkl-price> component (via the tier-change event’s updatesPrice flag). When false, the event still fires for custom integrations, but no price display reflects the tier.
CSS selector | "none"
default:"auto-detect"
Override or disable the price element target. Use "none" when pairing with <dkl-price>.
"true" | "false"
default:"false"
Sync the theme’s quantity selector to the selected tier’s quantity.
CSS selector | "none"
default:"auto-detect"
Override or disable the quantity input target.
event name
default:"(none)"
An extra theme event to also drive quantity sync, on top of quantity-selector:update. The component reads the quantity from the event’s detail.quantity, or re-reads the form input if absent.
"true" | "false"
default:"carrier (the discount's excludeSale)"
Disable tiers when the variant is already on sale.
string
default:"No discount available"
Label shown when a tier is unavailable.
Sold-out variants disable the tiers (on initial render and on variant change), independently of data-exclude-sale-prices — a selectable tier on a variant the form won’t add would be a dead end.
Server-rendered onto each input.dkl-volume-picker__radio; the component reads them. You don’t set these by hand — they’re listed for reference.
int
The tier’s position in the group.
"percentage" | "fixedAmount"
How the tier’s discount is expressed.
number
The fixed discount amount (when fixedAmount).
number
The discount percent (when percentage).
int (cents)
The pre-computed discounted unit price.

CSS styling tokens

Image highlighting the CSS styling tokens for the DKL Volume Picker component

CSS styling tokens for the DKL Volume Picker component - layout: cards

Two layers: a shadow <style> for the title/list structure, and the light-DOM card chrome in the stylesheet. The card chrome mostly consumes the global brand tokens so cards match the theme.

Structure

default:"0.75rem"
Space below the title row.
default:"600"
Group title font weight.
default:"0.95rem"
Group title font size.
default:"inherit"
Group title color.
default:"0.5rem"
Gap between options.
default:"tier count (max 3)"
Mini-buttons grid columns.
default:"0.375rem 1rem"
Mini-buttons option padding.
default:"#000000"
Border and ring of the selected tier.
default:"rgba(0,0,0,.12)"
Resting card border.
default:"8px"
Card corners.
default:"#fff"
Card background.
default:"rgba(0,0,0,.04)"
Hover background.
default:"#217a4a"
Focus-visible outline.

CSS parts and classes

The title/list scaffold is in shadow DOM (parts); the radio cards are slotted light DOM (classes).

Parts

Image highlighting the CSS parts for the DKL Volume Picker component

CSS parts for the DKL Volume Picker component - layout: cards

CSSPart
The <fieldset> wrapper.
CSSPart
The title row.
CSSPart
The <legend> group title.
CSSPart
The radiogroup holding the options.

Light-DOM classes

class
One tier card (selected: :has(.dkl-volume-picker__radio:checked)).
class
The radio input.
class
Card inner row.
class
Title + discount stack.
class
Tier heading (e.g. “Buy 3+”).
class
The “X% off each” line.
class
Per-tier price.
class
The unit suffix (e.g. “/ea”).
class
“No discount” placeholder.

Examples

Recolour the selected card border
Tighter list, bolder titles
Compact button layout

Next steps

App block

Configure these via theme-editor settings.

Web Components

Set these directly on the tag.