Skip to content
Docs
Available on the Shopify App Store

Order Goal

Image highlighting the DKL Order Goal component - layout: stacked DKL Order Goal component - layout: stacked

<dkl-order-goal> shows progress toward an order-goal discount’s spend tiers from the cart’s items subtotal: a progress track, evenly-spaced tier markers, and a “Spend [amount] more to save [discount]” message that flips to a success heading once every tier is met.

It’s a light-DOM component (like the discount badge) — no shadow DOM and no CSS parts. The Liquid snippet server-renders the full UI so it paints server-side, and the component re-renders in place on cart updates — recomputing the progress fraction, marker states, and message locally, which keeps it theme-agnostic.

  • Progress bar semantics. The track carries role="progressbar" with aria-valuemin, aria-valuemax, aria-valuenow, and a money-formatted aria-valuetext (e.g. “$40.00 of $100.00”), so assistive tech reports real progress toward the goal rather than a bare percentage.
  • Live progress message. The “Spend [amount] more…” headline (and the success message) is an aria-live="polite" region, so it’s announced as the cart total changes.
  • State beyond colour. Met tiers are marked with both an --active class and a check icon, not colour alone. Keep --dkl-og-progress-color and the marker colours at sufficient contrast when restyling.