> ## Documentation Index
> Fetch the complete documentation index at: https://discountkit.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Order Goal

> Cart progress bar toward an order-goal discount's spend tiers

<Tabs>
  <Tab title="Layout: Stacked">
    <Frame caption="DKL Order Goal component - layout: stacked">
      <img src="https://mintcdn.com/discountkit/qPmR0fAEpbjKUETr/images/components/dkl-order-goal-stacked-component.jpg?fit=max&auto=format&n=qPmR0fAEpbjKUETr&q=85&s=031519e478c7a19899f7c78819186dc9" alt="Image highlighting the DKL Order Goal component - layout: stacked" width="1600" height="1032" data-path="images/components/dkl-order-goal-stacked-component.jpg" />
    </Frame>
  </Tab>

  <Tab title="Layout: Horizontal">
    <Frame caption="DKL Order Goal component - layout: horizontal">
      <img src="https://mintcdn.com/discountkit/qPmR0fAEpbjKUETr/images/components/dkl-order-goal-horizontal-component.jpg?fit=max&auto=format&n=qPmR0fAEpbjKUETr&q=85&s=3820b57d3cf47c16a19b75fc3100cc1d" alt="Image highlighting the DKL Order Goal component - layout: horizontal" width="1600" height="1032" data-path="images/components/dkl-order-goal-horizontal-component.jpg" />
    </Frame>
  </Tab>
</Tabs>

`<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](/components/discount-badge/overview)) — 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.

<Info>
  **Cart total.** The component drives off the theme's standard `shopify:cart:lines-update`
  event, summing the cart's line costs into an items subtotal. When that yields no cart, it
  falls back to reading `/cart.js`, so custom-cart configurations are respected. Tier
  min-spends are compared against the presentment-currency subtotal with **no currency
  conversion** — multi-currency stores get face-value comparisons.
</Info>

## On this component

<CardGroup cols={1}>
  <Card title="App block" icon="puzzle-piece" href="/components/order-goal/app-block" horizontal>
    Add **DK: Order Goal** in the theme editor and configure it with settings — no code.
  </Card>

  <Card title="Web Components" icon="code" href="/components/order-goal/web-component" horizontal>
    Drop `<dkl-order-goal>` straight into your theme's Liquid and configure with `data-*`.
  </Card>

  <Card title="Styling & Data Attributes" icon="palette" href="/components/order-goal/styling-and-data" horizontal>
    The `data-*` attributes, `--dkl-og-*` styling tokens, and Light-DOM classes shared by both.
  </Card>

  <Card title="Events" icon="bell" href="/components/order-goal/events" horizontal>
    The tier-change event `<dkl-order-goal>` emits.
  </Card>
</CardGroup>

<Info>
  Both placements need the **Discount Kit Live** app embed enabled, and render identically —
  the same defaults back both. See [App blocks vs. Web Components](/components/app-blocks-vs-web-components)
  for how to choose.
</Info>

## Accessibility

* **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.
