Invoice table (Pro)
ProIncluded in $99Every invoice with status, amount and a PDF, the amount owed in the header, and Pay on what is still due.
On this page
ProA year of invoices with one past due. Pay it, sort by amount, or narrow to unpaid.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { InvoiceTable } from "@/components/ui/chatcn/pro/invoice-table"
<InvoiceTable
invoices={[
{ id: "inv_42", number: "INV-0042", date: "2026-03-01", period: "Feb 1 to Feb 28", amount: 412.8, status: "past-due", pdfHref: "/invoices/42.pdf" },
]}
currency="USD"
onPay={(id) => openPayment(id)}
/>Built on the free data-table: newest first, sortable by date and amount, a sticky header, and virtualized past 200 rows. Status reads in words with a colored dot (paid, due, past due, refunded, void). Rows still owed carry Pay, every row with a PDF carries a download, the header says how much is owed in total, and Unpaid narrows the list to just those. Date, amount and status come first so they stay in view on a phone.
Examples
States
ProNo invoices yet, loading, and a failed load with retry.
Props
| Prop | Type | Notes |
|---|---|---|
invoices | Invoice[] | { id, number, date, period?, amount, status, pdfHref? } |
currency, locale | string | Formatting |
onPay | (id) => void | Shows Pay on due and past due rows |
loading, error, onRetry | From data-table | |
labels | Partial<InvoiceTableLabels> | Every string, including status words |
Keyboard
| Key | Action |
|---|---|
| Tab | Moves through sort headers, Pay and downloads |
Accessibility
- A real table with sortable column headers that report their order.
- Downloads are links named by the invoice number.
- Status is a word, not only a color.
Motion
None.