pastetaste
Dot Ledger
A grid of dots, one per transaction: solid accent for paid, soft grey for open, a ring for late. Hover, tap or arrow-key to a dot to read its amount on a tag.
Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.
Live demo. Move the mouse and scroll inside it.
Install
Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/dot-ledger.tsx.
npx shadcn@latest add https://pastetaste.com/r/dot-ledger.jsonPrompt
Install the pastetaste component "Dot Ledger" (dot-ledger) into this Next.js project and use it.
What it is: A grid of dots, one per transaction: solid accent for paid, soft grey for open, a ring for late. Hover, tap or arrow-key to a dot to read its amount on a tag.
Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:
Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/dot-ledger.json
(it writes components/pastetaste/dot-ledger.tsx; install any npm packages it reports).
2. Import it: import { DotLedger } from "@/components/pastetaste/dot-ledger" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It supports prefers-reduced-motion with a still state; do not remove it.
Props (all optional unless the type has no default):
- entries: { amount: number; date: string; name?: string; status: 'paid' | 'open' | 'late' }[] = 96-entry sample — One entry per dot, in reading order.
- columns: number = 16 — Maximum number of columns; fewer are used when the container is narrow.
- minDot: number = 14 — Smallest dot diameter in px before the grid drops a column.
- gap: number = 8 — Space between dots in px.
- format: (n: number) => string = en-US, two decimals — Formats the amount on the tag and in the screen-reader label.
- prefix: string = '' — Small prefix before the amount, such as a currency sign.
- legend: boolean = true — Show the paid, open and late legend with counts under the grid.
- onSelect: (entry: LedgerEntry | null, index: number | null) => void — Called when a dot is pinned by click, tap or Enter, and with null when the pin is cleared.
- accent: string = var(--pt-accent, #ff4b2b) — Colour of paid dots and late rings.
- tone: 'light' | 'dark' = 'light' — Ink colours for paper or black grounds; --pt-ink, --pt-muted, --pt-line, --pt-surface and --pt-ledger-open override them.
- label: string = 'Transactions' — Accessible name of the grid.
- className: string — Extra classes on the root.
- style: CSSProperties — Inline style overrides on the root.
Live preview: https://pastetaste.com/c/dot-ledger
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.Props 13
| Prop | Type | Default | Description |
|---|---|---|---|
| entries | { amount: number; date: string; name?: string; status: 'paid' | 'open' | 'late' }[] | 96-entry sample | One entry per dot, in reading order. |
| columns | number | 16 | Maximum number of columns; fewer are used when the container is narrow. |
| minDot | number | 14 | Smallest dot diameter in px before the grid drops a column. |
| gap | number | 8 | Space between dots in px. |
| format | (n: number) => string | en-US, two decimals | Formats the amount on the tag and in the screen-reader label. |
| prefix | string | '' | Small prefix before the amount, such as a currency sign. |
| legend | boolean | true | Show the paid, open and late legend with counts under the grid. |
| onSelect | (entry: LedgerEntry | null, index: number | null) => void | - | Called when a dot is pinned by click, tap or Enter, and with null when the pin is cleared. |
| accent | string | var(--pt-accent, #ff4b2b) | Colour of paid dots and late rings. |
| tone | 'light' | 'dark' | 'light' | Ink colours for paper or black grounds; --pt-ink, --pt-muted, --pt-line, --pt-surface and --pt-ledger-open override them. |
| label | string | 'Transactions' | Accessible name of the grid. |
| className | string | - | Extra classes on the root. |
| style | CSSProperties | - | Inline style overrides on the root. |