Invoice History
The next invoice as a dashed estimate above the record, and notes for odd amounts.
PROGet Invoice History and 168 other Pro components with pro lifetime — Get Pro
- Category
- Billing
- Access
- ProPro · unlocked
- Source
- 290 lines · one file
- Added
- 28 Sept 2026
The decision inside it
Odd amounts explain themselves
July is $101 because one seat was over; May was refunded on the 18th. A note on the row answers the question before it becomes a support ticket.
When to use it
Use Invoice History for past invoices: number, date, amount (in cents) and status, the next invoice on top, pagination and download. For a general data table, use Data Table.
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 Invoice History for this.
Install it: npx shadcn@latest add @liro/invoice-history
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/invoice-history.
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
import { InvoiceHistory, type InvoiceRow } from "@/components/ui/invoice-history";
const invoices: InvoiceRow[] = [
{ number: "INV-2044", date: "14 Oct", amount: 8900, status: "paid", description: "Team · monthly" },
{ number: "INV-2041", date: "14 Sep", amount: 8900, status: "refunded" },
];
export function Invoices({ download }: { download: (number: string) => void }) {
return <InvoiceHistory invoices={invoices} next={{ date: "14 Nov", amount: 8900 }} 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.
| Type | Notes | ||
|---|---|---|---|
invoices | InvoiceRow[] | Yes | – |
next | NextInvoice | No | – |
currency | string | No | – |
locale | string | No | – |
title | string | No | – |
subtitle | string | No | Shown beside the title — whose invoices these are. |
pageSize | number | No | Rows before "Show more". Default 5. |
onDownload | (number: string) => void | No | – |
look | Look | No | Layered sets it in a tray, the heading above the card and the status in the strip below. Flat is one card. |
Dependencies
npm packages
clsxlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themestatus-chipAccessibility
- 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