Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Order Summary

ProNew

Subtotal, shipping, tax and discounts, then the total set apart, with a slot for a promo field and the checkout button.

Installation

pnpm dlx shadcn@latest add @viewport/order-summary

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
titlestring

The heading.

"Order summary"
lines*SummaryLine[]

Subtotal, shipping, tax and discounts, in order.

—
total*{ label?: string; value: string; hint?: string }

The amount to pay.

—
childrenReact.ReactNode

A promo code field, a checkout button, trust notes: placed under the total.

—

Accessibility

  • A description list, so each amount is read with its label.
  • Tabular numerals aligned to the end for comparing down the column.
  • Discounts are marked with a minus sign as well as color.
  • Server component with no client JavaScript.