Staaarter

Billing Receipt Details

A detailed receipt view for a single transaction, listing each line item with quantity and amount, then a subtotal, tax, and total, followed by a payment method summary. Meant for the expanded view a customer sees after clicking into a specific invoice from their billing history.

By Staaarter Team
Billing
Updated February 21, 2026
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/billing-receipt-details.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/billing/billing108.tsx instead.

Usage

The file also exports billing108Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Billing108, billing108Demo } from "@/components/blocks/billing/billing108";

export default function Page() {
  return <Billing108 {...billing108Demo} />;
}

Props

PropTypeDefaultDescription
titlestring"Receipt"Heading at the top of the card.
receiptNumberstringnoneReceipt or invoice identifier shown under the title.
datestringnoneFormatted date of the transaction.
billedTostringnoneOptional customer or company name the receipt was billed to.
lineItemsReceiptLineItem[]noneRows rendered in the order given; the component does not sort or total them beyond what you pass in subtotal/tax/total.
subtotalstringnoneFormatted subtotal before tax.
taxLabelstring"Tax"Label on the tax row, for example "Tax (8.5%)" if you want the rate included.
taxstringnoneOptional formatted tax amount. The tax row is omitted entirely when not set.
totalstringnoneFormatted grand total.
paymentMethodLabelstringnonePayment method summary, for example "Visa ending in 4242".
printHrefstringnoneOptional link for a print or printable-receipt action, shown top-right when set.
printLabelstring"Print"Label next to the print icon.
classNamestringnoneExtra classes for the outer container.

Types

interface ReceiptLineItem {
  id: string;
  description: string;
  quantity?: number;
  amount: string;
}

Behavior notes

  • Subtotal, tax, and total are all plain strings you compute and pass in; the component doesn't sum lineItems itself, so it stays correct even if your pricing has proration or rounding rules baked in server-side.
  • The tax row only renders when tax is set, so receipts with no tax (for example a $0 invoice or a tax-exempt customer) can omit it cleanly instead of showing a $0.00 line.
  • quantity defaults to 1 on any line item where it's left unset.
  • Print is a next/link, not a window.print() call, so by default it can point at a server-generated PDF or a hosted receipt URL from your billing provider. Swap it for a client-side print trigger if you'd rather open the browser's print dialog directly.
  • The layout uses plain table markup for the line items, so it stays legible when copied into an email or exported to PDF.

Frequently asked questions