Skip to content
Docs
Available on the Shopify App Store

Styling & Data Attributes

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.

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.

Per-tier attributes (data-dkl-*)

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.

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.

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.

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

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.

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.

Recolour the selected card border
:root {
--dkl-vp-selected-border-color: #2563eb;
}
Tighter list, bolder titles
:root {
--dkl-vp-list-gap: 0.25rem;
--dkl-vp-title-font-weight: 700;
}
Compact button layout
<dkl-volume-picker-radio-groups
data-style="mini-buttons"
style="--dkl-vp-mini-padding: 0.25rem 0.75rem;"
></dkl-volume-picker-radio-groups>