Tally UI

ReceiptPreview

Renders a receipt-style summary with line items, totals, and optional payment details

Import

import { ReceiptPreview } from '@tallyui/components';

Usage

<ReceiptPreview
  items={[{ name: 'Espresso', quantity: 2, total: '$9.00' }]}
  subtotal="$9.00"
  tax="$0.72"
  total="$9.72"
/>

Displays a receipt-style card with itemised lines, subtotal, tax, and total. You can optionally show payment methods and plug in custom header or footer content through slots.

Props

PropTypeDefaultDescription
itemsReceiptItem[]requiredArray of line items
subtotalstringrequiredFormatted subtotal
taxstringrequiredFormatted tax amount
totalstringrequiredFormatted order total
paymentsArray<{ method: string; amount: string }>Payment method rows
headerSlotReactNodeContent above the item list
footerSlotReactNodeContent below everything
classNamestringOverride container styles

ReceiptItem

interface ReceiptItem {
  name: string;
  quantity: number;
  total: string;
}

Live demo

On this page