Order Summary

A checkout summary card listing line items such as subtotal, shipping and tax, then a separator and a bold total. Built with React for cart pages.

src/registry/ui/order-summary.tsx/r/order-summary.json

Installation#

bash
npx shadcn@latest add @minidev/order-summary

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/order-summary.json

Usage#

tsx
import { OrderSummary } from "@/components/ui/order-summary"

export function Example() {
  return (
    <OrderSummary lines={[{ label: "Subtotal", value: "$49.00" }, { label: "Tax", value: "$3.92" }]} total="$52.92" />
  )
}

API reference#

OrderSummary props
PropTypeDefault
linesLine[]SAMPLE_LINES
totalstringSAMPLE_TOTAL
classNamestring-

Dependencies#

npm

React only

Built from

Examples#

All e-commerce components