pastetaste
Progress Glyph
Two-tone loading glyph in six forms (arc, dots, refresh, pie, merge, fold). Loops while waiting, fills to a real value, and settles into a drawn tick or cross. Compositor-only loops.
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/progress-glyph.tsx.
npx shadcn@latest add https://pastetaste.com/r/progress-glyph.jsonPrompt
Install the pastetaste component "Progress Glyph" (progress-glyph) into this Next.js project and use it.
What it is: Two-tone loading glyph in six forms (arc, dots, refresh, pie, merge, fold). Loops while waiting, fills to a real value, and settles into a drawn tick or cross. Compositor-only loops.
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/progress-glyph.json
(it writes components/pastetaste/progress-glyph.tsx; install any npm packages it reports).
2. Import it: import { ProgressGlyph } from "@/components/pastetaste/progress-glyph" (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):
- variant: 'arc' | 'dots' | 'refresh' | 'pie' | 'merge' | 'fold' = 'arc' — Which form to draw: ring arc, ring of dots, refresh arrow with a dashed tail, pie, four dots that gather and spread, diamond of tiles that builds and folds.
- value: number | null = undefined — 0 to 1 shows real progress and eases to each new value; leave it out for a looping wait.
- state: 'loading' | 'done' | 'error' = 'loading' — done and error shrink the glyph away and draw a tick or a cross on a disc in its place.
- size: number | string = 24 — Width and height in px, or any CSS length; '1em' sits in a line of text.
- color: string = --pt-loader-color, then currentColor — Lit colour, also the disc of the done state.
- track: string = --pt-loader-track, then 15% of currentColor — Colour of the unlit parts.
- markColor / errorColor: string / string = '#fff' / '#c8402a' — Tick and cross colour, and the disc colour of the failed state.
- speed: number = 1 — Tempo multiplier for the loops: 2 is twice as fast, 0.5 half.
- label / doneLabel / errorLabel: string = 'Loading' / 'Done' / 'Failed' — What a screen reader hears in each state; label also names the progress bar when value is set.
- decorative: boolean = false — Hide it from assistive tech, e.g. inside a button whose text already says Saving.
- className / style: string / CSSProperties — Passed to the outer span; CSS variables set here restyle a single glyph.
Live preview: https://pastetaste.com/c/progress-glyph
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.Props 11
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'arc' | 'dots' | 'refresh' | 'pie' | 'merge' | 'fold' | 'arc' | Which form to draw: ring arc, ring of dots, refresh arrow with a dashed tail, pie, four dots that gather and spread, diamond of tiles that builds and folds. |
| value | number | null | undefined | 0 to 1 shows real progress and eases to each new value; leave it out for a looping wait. |
| state | 'loading' | 'done' | 'error' | 'loading' | done and error shrink the glyph away and draw a tick or a cross on a disc in its place. |
| size | number | string | 24 | Width and height in px, or any CSS length; '1em' sits in a line of text. |
| color | string | --pt-loader-color, then currentColor | Lit colour, also the disc of the done state. |
| track | string | --pt-loader-track, then 15% of currentColor | Colour of the unlit parts. |
| markColor / errorColor | string / string | '#fff' / '#c8402a' | Tick and cross colour, and the disc colour of the failed state. |
| speed | number | 1 | Tempo multiplier for the loops: 2 is twice as fast, 0.5 half. |
| label / doneLabel / errorLabel | string | 'Loading' / 'Done' / 'Failed' | What a screen reader hears in each state; label also names the progress bar when value is set. |
| decorative | boolean | false | Hide it from assistive tech, e.g. inside a button whose text already says Saving. |
| className / style | string / CSSProperties | - | Passed to the outer span; CSS variables set here restyle a single glyph. |