---
title: "Cart Summary"
description: "Shows cart totals and the action to proceed to checkout - a free-shipping progress bar, the breakdown, the total, checkout and how you can pay."
slug: "cart-summary"
---

import { DocPage, PageHeader, SkillPanel, SourceFiles, DocLink, SkillField, SkillText, SkillRow, ApiPill } from "../../lib/components/index";

<DocPage meta={meta}>

<PageHeader slug="cart-summary" title="Cart Summary" component="cart-summary">
  Shows cart totals and the action to proceed to checkout - a free-shipping progress bar, the breakdown, the total, checkout and how you can pay. Part of the <DocLink href="website-shop.html">Shop</DocLink> blocks.
</PageHeader>

<SkillPanel component="cart-summary">
  <SkillField label="Native basis">
<SkillText>An <code>&lt;aside&gt;</code>: a Progress field ("€16 to free shipping"), a <code>&lt;dl&gt;</code> of subtotal, discount, shipping and tax, the total (<code>aria-live="polite"</code>), the checkout Button, the accepted payment methods and a security note.</SkillText>
  </SkillField>

  <SkillField label="Built from">
<SkillText><DocLink href="progress.html">Progress</DocLink>, <DocLink href="button.html">Button</DocLink>.</SkillText>
  </SkillField>

  <SkillField label="Web Platform APIs">
<SkillRow>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl" title="term / value pairs"><code>&lt;dl&gt;</code></ApiPill>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress" title="native completion bar"><code>&lt;progress&gt;</code></ApiPill>
    <ApiPill href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output" title="a computed result"><code>&lt;output&gt;</code></ApiPill>
  </SkillRow>
  </SkillField>

  <SkillField label="Classes">
<SkillRow>
    <code>.mk-cart-summary</code>
    <code>.mk-cart-summary-title</code>
    <code>.mk-cart-summary-shipping</code>
    <code>.mk-cart-summary-lines</code>
    <code>.mk-cart-summary-total</code>
    <code>.mk-cart-summary-checkout</code>
    <code>.mk-cart-summary-pay</code>
    <code>.mk-cart-summary-note</code>
  </SkillRow>
  </SkillField>

  <SkillField label="Data attributes">
<SkillText><code>data-variant="compact"</code>.</SkillText>
  </SkillField>
</SkillPanel>

```html example label="Default" hint="A Progress field toward free shipping, the breakdown (<dl> - the discount reads &quot;−€24&quot; in text, not only color), the total in a polite live <output>, checkout, accepted payments and a security note." previewStyle="align-items:stretch;"
<aside class="mk-cart-summary" aria-labelledby="cs-title" style="max-width: 24rem">
  <h2 class="mk-cart-summary-title" id="cs-title">Order summary</h2>
  <div class="mk-cart-summary-shipping"
    ><label for="cs-free">Add <strong>€16.00</strong> more for free shipping</label
    ><progress class="progress" id="cs-free" value="84" max="100">84%</progress></div
  >
  <dl class="mk-cart-summary-lines">
    <div><dt>Subtotal (3 items)</dt><dd>€108.00</dd></div>
    <div data-discount><dt>Discount · AUTUMN30</dt><dd>−€24.00</dd></div>
    <div><dt>Shipping</dt><dd>€4.90</dd></div>
    <div><dt>VAT (included)</dt><dd>€16.62</dd></div>
  </dl>
  <div class="mk-cart-summary-total"
    ><span>Total<small>incl. VAT</small></span
    ><output aria-live="polite">€88.90</output></div
  >
  <a class="btn mk-cart-summary-checkout" data-size="lg" href="#">Checkout <i data-lucide="arrow-right"></i></a>
  <ul class="mk-cart-summary-pay" aria-label="We accept"
    ><li>VISA</li
    ><li>MASTERCARD</li
    ><li>PAYPAL</li
    ><li>APPLE PAY</li
    ><li>KLARNA</li></ul
  >
  <p class="mk-cart-summary-note"><i data-lucide="lock"></i> Secure checkout · 30-day returns</p>
</aside>
```

```html example label="Compact" hint="data-variant='compact': subtotal and checkout only - the foot of a mini cart." previewStyle="align-items:stretch;"
<aside class="mk-cart-summary" data-variant="compact" aria-label="Cart total" style="max-width: 22rem">
  <div class="mk-cart-summary-total"
    ><span>Subtotal<small>Shipping at checkout</small></span
    ><output aria-live="polite">€108.00</output></div
  >
  <a class="btn mk-cart-summary-checkout" href="#">Checkout</a>
</aside>
```

<SourceFiles component="cart-summary" section="css" />

</DocPage>
