---
title: "Order summary with discount code"
description: "A checkout's order summary: the pieces, a discount code field and totals that recompute, folding into a bar on phones."
plan: Pro
docs: https://ui.edbn.me/docs/blocks/order-summary
---

# Order summary with discount code

A checkout's order summary: the pieces, a discount code field and totals that recompute, folding into a bar on phones.

Lists the pieces with their quantities, then Subtotal, Shipping, Discount, Estimated tax and Total, which recompute as a code applies or comes off. Apply checks the code: an unknown or ended one says why under the field, and a good one shows its offer with Remove. Changes are announced. In a column narrower than 448px, as on a phone's checkout, the summary folds into a bar with the total; the bar opens it in place.

A Pro block built on Base UI and Tailwind CSS v4.

## Installation

This is a Pro item. Once per project, create a token at https://ui.edbn.me/dashboard/tokens, put it in `.env.local` as `EDBN_TOKEN`, and add the registry to `components.json`:

```json
{
  "registries": {
    "@edbn": {
      "url": "https://ui.edbn.me/r/{name}.json",
      "headers": { "Authorization": "Bearer ${EDBN_TOKEN}" }
    }
  }
}
```

Then install:

```bash
npx shadcn@4.19.0 add @edbn/order-summary
```

## Dependencies
- npm: lucide-react@^1.33.0
- edbn: edbn-base, aspect-ratio, card, collapsible, field, input-group, separator, spinner, text-link

## Source

The source is part of Pro (https://ui.edbn.me/pricing). The install above adds it to the project, ready to edit.

## More cart & checkout blocks

All 5, with install commands: https://ui.edbn.me/docs/blocks/cart-and-checkout · https://ui.edbn.me/docs/blocks/cart-and-checkout.md

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
