npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-progress.json --yesProgress
ProA bar for work under way, its amount known or not, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
- ProgressIndicatorThe fill of a
Progress
import { Progress, ProgressIndicator } from '@/components/ui/goop/progress';
function ImportBar({ done = 12, total = 30 }: { done?: number; total?: number | null }) {
return (
<Progress
value={total === null ? null : done}
max={total ?? 100}
aria-label="Import"
{...(total === null ? {} : { 'aria-valuetext': `${done} of ${total} files` })}
/>
);
}Set the value (or leave it unknown and watch the segment sweep) and the most the bar is full at, put a caption and the value text over it; start a fake import of thirty files: it sweeps while it counts them, then fills. The import is a row of timers, all cleared when the example goes.
When to use
- A bar for work under way, its amount known or not.
- Also called: progress bar.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Progress on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-progress.json --yesAdd the Goop Progress to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Progress, ProgressIndicator } from '@/components/ui/goop/progress';
function ImportBar({ done = 12, total = 30 }: { done?: number; total?: number | null }) {
return (
<Progress
value={total === null ? null : done}
max={total ?? 100}
aria-label="Import"
{...(total === null ? {} : { 'aria-valuetext': `${done} of ${total} files` })}
/>
);
}- Fits: flow, settings: body.
- height, width, corner, background, motion: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| value? | number | null | How far the work has gone, from 0 to max; below 0 draws 0, above max draws max, NaN draws 0. |
| max? | number = 100 | The value at which the bar is full; one that is 0, negative or not finite reads as 100. |
| aria-label? | string | The bar's name, said by a reader ("Uploading files"); or name it with aria-labelledby. |
| aria-labelledby? | string | The id of the element whose words name the bar (a caption beside it). |
| aria-hidden? | true | 'true' | Hides the bar from readers, where words beside it already say how far the work has gone. |
| role? | 'meter' | A meter that wears the bar passes role="meter" and names it itself (the theme's Meter does). |
| Part | What it is |
|---|---|
| ProgressIndicator | The fill of a Progress |
- data-slot values (to select a part by): progress, progress-indicator
Motion
- The part sets its own motion: add no transition or animation of your own.
- How the theme moves, and how to move your own parts the same way: Motion.
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.