Transaction List
ProNewMoney in and out by day, with headings that stay in view and carry the day's total, amounts aligned in tabular numerals and pending payments marked.
Installation
pnpm dlx shadcn@latest add @viewport/transaction-list
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 |
|---|---|---|
| groups* | { title: string; items: Transaction[] }[]The transactions in groups, newest first, usually one group per day. | — |
| onSelect | (id: string) => voidMakes each row a button, e.g. to open the transaction. | — |
| format | (amount: number) => string | money |
| className | string | — |
Accessibility
- Each day is a labelled section with a heading.
- Money in has a plus sign as well as a color.
- Pending is a word and an icon.
- Rows are buttons only when they do something.
- No client JavaScript of its own.