Invoice Row
ProNewOne invoice in a list: number, description, status in words with an icon, dates and amount, with overdue and refunded treated distinctly and a slot for actions.
Installation
pnpm dlx shadcn@latest add @viewport/invoice-row
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| number* | stringThe invoice's number, e.g. "INV-2026-012". | — |
| description | stringWho it is for, or what it covers. | — |
| amount* | stringThe amount, already formatted. | — |
| status* | keyof typeof states | — |
| issued | stringWhen it was issued, and when it is or was due, already formatted. | — |
| due | string | — |
| href | stringOpens the invoice. The number becomes the link. | — |
| actions | React.ReactNodeButtons at the end of the row, e.g. download or pay. | — |
Accessibility
- Status is a word and an icon as well as a color.
- The number is the link; actions name the invoice they act on.
- Dates drop under the number on narrow containers.
- Server component with no client JavaScript.