Styling & Data Attributes
This is the shared reference for <dkl-order-goal> — the data-* attributes that drive its
behaviour, the --dkl-og-* tokens that style it, and the Light-DOM classes you can target.
The app block settings map onto these; on a custom
element you set them directly.
Data attributes
Section titled “Data attributes”All optional — on a web component the carrier supplies them by default. Set one to override.
data-discount-id
Section titled “data-discount-id”metaobject handle · default: first eligible
Pick a specific order-goal discount’s carrier. The discount- prefix is optional; place one
tag per discount to show several.
data-cart-total-cents
Section titled “data-cart-total-cents”int · default: carrier (render-time subtotal)
The baseline cart total.
data-money-format
Section titled “data-money-format”string · default: carrier (shop.money_format)
Money format for JS-rendered amounts.
data-message-template
Section titled “data-message-template”string · default: Spend [amount] more to save [discount] on your order!
The spend-more message. [amount] and [discount] are replaced at runtime.
data-success-heading
Section titled “data-success-heading”string · default: Winner Winner 🎉
Heading shown once every tier is met.
data-success-message
Section titled “data-success-message”string · default: You've unlocked all available savings
Content shown once every tier is met.
data-tier-save-label
Section titled “data-tier-save-label”string · default: Save [discount]
Per-tier label; [discount] is the placeholder.
data-tier-spend-label
Section titled “data-tier-spend-label”string · default: when you spend [amount]+
Per-tier spend line; [amount] is the placeholder.
data-layout
Section titled “data-layout”"horizontal" | "stacked" · default: horizontal
Layout variant. stacked arranges markers in a column with the progress bar rotated.
CSS styling tokens
Section titled “CSS styling tokens”
CSS styling tokens for the DKL Order Goal component - layout: stacked
CSS styling tokens for the DKL Order Goal component - layout: horizontal
<dkl-order-goal> is styled by a stylesheet loaded site-wide by the embed. Set any token
above the element (:root, the embed’s Custom CSS, an inline style, or the block’s scoped
rule).
--dkl-og-margin-top
Section titled “--dkl-og-margin-top”default: 0
Space above the widget (block Margin top).
--dkl-og-margin-bottom
Section titled “--dkl-og-margin-bottom”default: 0
Space below the widget (block Margin bottom).
--dkl-og-background
Section titled “--dkl-og-background”default: var(--dkl-color-background-soft)
Card background (block Background color).
--dkl-og-padding
Section titled “--dkl-og-padding”default: 1rem
Card padding (block Padding).
--dkl-og-radius
Section titled “--dkl-og-radius”default: var(--dkl-radius)
Card corners (block Border radius).
--dkl-og-font-size
Section titled “--dkl-og-font-size”default: inherit
Base font size — emitted only when block Font sizing is Custom, else inherits the theme.
--dkl-og-font-size-mobile
Section titled “--dkl-og-font-size-mobile”default: var(--dkl-og-font-size)
Base font size at ≤749px (block Font size (mobile), Custom only).
--dkl-og-text-color
Section titled “--dkl-og-text-color”default: var(--dkl-color-text)
Card text colour (block Text color).
--dkl-og-tier-label-color
Section titled “--dkl-og-tier-label-color”default: inherit
The “Save [discount]” tier label (block Tier label color).
--dkl-og-tier-spend-color
Section titled “--dkl-og-tier-spend-color”default: inherit
The “when you spend [amount]+” tier line (block Tier spend label color).
--dkl-og-track-color
Section titled “--dkl-og-track-color”default: var(--dkl-color-border)
Progress track (unfilled bar) colour (block Track color).
--dkl-og-progress-color
Section titled “--dkl-og-progress-color”default: var(--dkl-color-accent)
Progress fill colour (block Progress bar color).
--dkl-og-marker-size
Section titled “--dkl-og-marker-size”default: 2rem
Tier marker size.
--dkl-og-marker-border-color
Section titled “--dkl-og-marker-border-color”default: var(--dkl-color-border)
Inactive marker border colour.
--dkl-og-marker-bg
Section titled “--dkl-og-marker-bg”default: var(--dkl-color-background)
Inactive marker fill (block Icon background (not met)).
--dkl-og-marker-active-color
Section titled “--dkl-og-marker-active-color”default: var(--dkl-color-accent)
Active (met) marker fill (block Icon background (met)).
--dkl-og-marker-icon-active-color
Section titled “--dkl-og-marker-icon-active-color”default: #ffffff
Active marker check-icon colour.
Light-DOM classes
Section titled “Light-DOM classes”<dkl-order-goal> is all light DOM — no parts. Target these classes directly.
dkl-order-goal
Section titled “dkl-order-goal”host
The card (host element).
.dkl-order-goal__message
Section titled “.dkl-order-goal__message”class
The headline / progress message.
.dkl-order-goal__progress
Section titled “.dkl-order-goal__progress”class
The progress bar (with .dkl-order-goal__progress-track; the fill is the track’s ::before).
.dkl-order-goal__tiers
Section titled “.dkl-order-goal__tiers”class
The tier row/column.
.dkl-order-goal__tier
Section titled “.dkl-order-goal__tier”class
The wrapper for each tier.
.dkl-order-goal__tier-marker
Section titled “.dkl-order-goal__tier-marker”class
The marker dot (met: .dkl-order-goal__tier-marker--active; the icon glyph is its ::before).
.dkl-order-goal__tier-label
Section titled “.dkl-order-goal__tier-label”class
The wrapper for the tier label.
.dkl-order-goal__tier-text
Section titled “.dkl-order-goal__tier-text”class
The “Save [discount]” text in the tier label.
.dkl-order-goal__tier-amount
Section titled “.dkl-order-goal__tier-amount”class
The “when you spend [amount]+” text in the tier label.
Examples
Section titled “Examples”:root { --dkl-og-progress-color: #6d28d9; --dkl-og-marker-active-color: #6d28d9; --dkl-og-track-color: #ede9fe;}
.dkl-order-goal__tier-marker--active { box-shadow: 0 0 0 3px #ede9fe;}<dkl-order-goal data-message-template="Add [amount] more for [discount] off!" data-success-heading="You did it! 🎉" data-success-message="Every reward unlocked" data-tier-save-label="[discount] off" data-tier-spend-label="at [amount]+"></dkl-order-goal>