Invoice list


Install
npx shadcn add @klarhimmel/app-billing-invoicesDetailsAbout, usage, props and more
A list of invoices as a table: number, date, amount, a status badge (paid, due, failed: always a word) and a download link named for its invoice that stays in view…
States
invoice list in 2 forms: filled, empty.
state: filled
Billing
Invoices
Say whose invoices these are and what can be done with one.
Name the list and its order Invoice Date Amount Status Download PDF XXX-0001 1 Jan 0000 $00 DueDownload PDFXXX-0001 XXX-0002 1 Jan 0000 $00 PaidDownload PDFXXX-0002 XXX-0003 1 Jan 0000 $00 PaidDownload PDFXXX-0003 XXX-0004 1 Jan 0000 $00 FailedUpdate card XXX-0004Download PDFXXX-0004 Say there are more columns
- Download PDF XXX-0001
XXX-0001 · 1 Jan 0000
$00Due - Download PDF XXX-0002
XXX-0002 · 1 Jan 0000
$00Paid - Download PDF XXX-0003
XXX-0003 · 1 Jan 0000
$00Paid - Download PDF XXX-0004
XXX-0004 · 1 Jan 0000
$00FailedUpdate card XXX-0004
Say that a new attempt started and where the result is sent.
Processing
No invoices yet
Say when the first item will appear here and what causes it.
state: empty
Billing
Invoices
Say whose invoices these are and what can be done with one.
Name the list and its order Invoice Date Amount Status Download PDF XXX-0001 1 Jan 0000 $00 DueDownload PDFXXX-0001 XXX-0002 1 Jan 0000 $00 PaidDownload PDFXXX-0002 XXX-0003 1 Jan 0000 $00 PaidDownload PDFXXX-0003 XXX-0004 1 Jan 0000 $00 FailedUpdate card XXX-0004Download PDFXXX-0004 Say there are more columns
- Download PDF XXX-0001
XXX-0001 · 1 Jan 0000
$00Due - Download PDF XXX-0002
XXX-0002 · 1 Jan 0000
$00Paid - Download PDF XXX-0003
XXX-0003 · 1 Jan 0000
$00Paid - Download PDF XXX-0004
XXX-0004 · 1 Jan 0000
$00FailedUpdate card XXX-0004
Say that a new attempt started and where the result is sent.
Processing
No invoices yet
Say when the first item will appear here and what causes it.
Notes
When to use it
A table of past invoices with status and a download link per row, for a billing page. For the current plan and usage use app-billing-plan; for a generic table of other data use app-data-table.
Writing for it
- Rows take 1 to 8 entries. Each has a number, date and amount of 30 characters at most, a status of paid, due or failed, and an href for the download file.
- Set download (30) to a short verb like Download; the invoice number is appended for screen readers so the link is not just the same word eight times.
- Use recovery only for failed rows: payAgain and an updateCard link appear there, and said (80) is the announcement after a retry.
Watch out for
Eight rows is the ceiling, so a long history needs app-data-pagination or a link elsewhere. In the empty state messages.emptyTitle is required, and the Pay again button only changes the row to processing locally; it does not charge anything.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | 'Billing' | Text, up to 60 characters. Optional; empty is not rendered. |
title | string | 'Invoices' | Text, up to 120 characters. |
description | string | 'Say whose invoices these are and wh…' | Text, up to 300 characters. Optional; empty is not rendered. |
caption | string | 'Name the list and its order' | Text, up to 80 characters. |
columns | { number, date, amount, status } | {…} | Fields: number, date, amount, status. |
rows | { number, date, amount, status, href }[] | 4 items | List of 1 to 8. Each item: number, date, amount, status ('paid' | 'due' | 'failed'), href. |
statusLabels | { paid, due, failed } | {…} | Fields: paid, due, failed. |
download | string | 'Download PDF' | Text, up to 30 characters. |
scrollHint | string | 'Say there are more columns' | Text, up to 40 characters. |
recovery | { payAgain, updateCard, processing, said } | {…} | Fields: payAgain, updateCard, processing, said. |
state | 'filled' | 'empty' | 'filled' | One of 'filled', 'empty'. |
messages | { emptyTitle, emptyBody } | {…} | Fields: emptyTitle, emptyBody. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |
Install
Installs
- Badge
- ButtonLink
- EmptyState
- About
- A list of invoices as a table: number, date, amount, a status badge (paid, due, failed: always a word) and a download link named for its invoice that stays in view while the other columns scroll, and a failed invoice that can be paid…
- States
- Paid, due and failed rows, and an empty list. Every status is a word, every download link names its invoice. New project? Set it up once: /get-started/installation.