Receipt

A printable receipt where a refund is a new line, never an edit.

PROGet Receipt and 168 other Pro components with pro lifetime — Get Pro

Category
Billing
Access
Pro
Source
275 lines · one file
Added
28 Sept 2026

The decision inside it

The charge is never rewritten

A refund is appended under the total, dated, with the net as a third figure. The record still says what was charged, which is what an accountant opening it next year needs.

When to use it

Use Receipt for a printable payment receipt: seller and buyer, lines, discount, tax and total (all in cents), the payment method and a refund note, with download.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Receipt for this.
Install it: npx shadcn@latest add @liro/receipt
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/receipt.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/receipt-view.tsx
import { Receipt } from "@/components/ui/receipt";

export function ReceiptView({ download }: { download: () => void }) {
  return (
    <Receipt
      number="R-2044"
      issuedOn="14 Oct 2026"
      seller={{ name: "Liro", address: ["12 Harbour St", "Dublin"] }}
      billedTo={{ name: "Michael Carter", company: "Madgixs" }}
      lines={[{ label: "Team plan", detail: "14 Oct – 14 Nov", amount: 8900 }]}
      tax={{ label: "VAT 23%", amount: 2047 }}
      total={10947}
      onDownload={download}
    />
  );
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
numberstring Yes–
issuedOnstring YesDisplay strings. The component formats no dates.
sellerReceiptParty Yes–
billedToReceiptParty Yes–
linesReceiptLine[] Yes–
discount{ label: string; amount: Cents } No–
tax{ label: string; amount: Cents; note?: string } NoAlways pass one where tax could apply — a zero line with its reason is a line.
totalCents Yes–
payment{ network: CardNetwork; last4: string; on: string } No–
refund{ amount: Cents; on: string; reason?: string } No–
currencystring No–
localestring No–
onDownload() => void No–
lookLook NoLayered sets the receipt on a card in a tray, the seller above and the card that paid in the strip below. Flat is one card.

Dependencies

npm packages

clsxlucide-reacttailwind-merge

Liro foundations, installed alongside it

liro-themecard-brandstatus-chip

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances