pastetaste
Dotted Gauge
A ring of dots that fills to a value (days left, a daily goal). Dots light in sequence, the lead dot grows and breathes, the centre number counts up. Meter semantics; works in a tile or bare.
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/dotted-gauge.tsx.
npx shadcn@latest add https://pastetaste.com/r/dotted-gauge.jsonDependenciesmotion@^12.23.0widget-frame
Prompt
Install the pastetaste component "Dotted Gauge" (dotted-gauge) into this Next.js project and use it.
What it is: A ring of dots that fills to a value (days left, a daily goal). Dots light in sequence, the lead dot grows and breathes, the centre number counts up. Meter semantics; works in a tile or bare.
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/dotted-gauge.json
(it writes components/pastetaste/dotted-gauge.tsx and its pastetaste dependencies: widget-frame; install any npm packages it reports: motion@^12.23.0).
2. Import it: import { DottedGauge } from "@/components/pastetaste/dotted-gauge" (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):
- value: number = 18 — The number shown and the amount the ring fills to, in the same unit as max.
- max: number = 30 — Value at which the ring is full.
- unit: string — Small word under the centre number, e.g. 'days' or 'of 8'.
- label: string = 'Gauge' — Accessible name of the meter; also printed under the ring inside a tile.
- icon: ReactNode — Centre content instead of the number, e.g. a letter or an icon.
- dots: number = 40 — Number of dots around the ring (8 or more).
- decimals / format: number / (n: number) => string = 0 — How the centre number is written; format wins over decimals.
- color: string = accent on dark, ink on light and accent tiles — Lit dot colour.
- frame: boolean = true — Wrap the ring in a widget tile. Off gives a bare ring that fills its parent's width and scales its text with it.
- size / tone / accent: WidgetSize / WidgetTone / string = '1x1' / 'dark' / token — Passed to the tile.
- duration: number = 1.2 — Seconds a full lap of the ring takes to fill; smaller changes take proportionally less (never under 0.35 s).
- dotSize: number = auto — Dot radius in ring units (the ring is 100 wide); raise it for small bare rings.
Live preview: https://pastetaste.com/c/dotted-gauge
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.Props 12
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | 18 | The number shown and the amount the ring fills to, in the same unit as max. |
| max | number | 30 | Value at which the ring is full. |
| unit | string | - | Small word under the centre number, e.g. 'days' or 'of 8'. |
| label | string | 'Gauge' | Accessible name of the meter; also printed under the ring inside a tile. |
| icon | ReactNode | - | Centre content instead of the number, e.g. a letter or an icon. |
| dots | number | 40 | Number of dots around the ring (8 or more). |
| decimals / format | number / (n: number) => string | 0 | How the centre number is written; format wins over decimals. |
| color | string | accent on dark, ink on light and accent tiles | Lit dot colour. |
| frame | boolean | true | Wrap the ring in a widget tile. Off gives a bare ring that fills its parent's width and scales its text with it. |
| size / tone / accent | WidgetSize / WidgetTone / string | '1x1' / 'dark' / token | Passed to the tile. |
| duration | number | 1.2 | Seconds a full lap of the ring takes to fill; smaller changes take proportionally less (never under 0.35 s). |
| dotSize | number | auto | Dot radius in ring units (the ring is 100 wide); raise it for small bare rings. |