npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-meter.json --yesMeter
ProA bar showing a measurement inside a known range, such as storage used or a quota, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
- MeterLabelWhat the meter measures, in the small quiet text style
- MeterValueThe used amount and the limit as the caller writes them ("18 of 25"), at the row's end
import { Meter, MeterLabel, MeterValue } from '@/components/ui/goop/meter';
<>
<Meter value={18} max={25} threshold={20} valueText="18 of 25 seats used">
<MeterLabel>Seats</MeterLabel>
<MeterValue>18 of 25</MeterValue>
</Meter>
<Meter value={6} max={25} threshold={8} good="up" valueText="6 of 25 bags left">
<MeterLabel>Clay</MeterLabel>
<MeterValue>6 of 25</MeterValue>
</Meter>
</>Move the value past the threshold (the fill warns and an icon appears), switch which way is good (warn above, or below), drop the tick or the threshold. The seats and bags are ours.
When to use
- A bar showing a measurement inside a known range, such as storage used or a quota.
- Also called: gauge.
When not to use
- For work under way use Progress.
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 Meter 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-meter.json --yesAdd the Goop Meter to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Meter, MeterLabel, MeterValue } from '@/components/ui/goop/meter';
<>
<Meter value={18} max={25} threshold={20} valueText="18 of 25 seats used">
<MeterLabel>Seats</MeterLabel>
<MeterValue>18 of 25</MeterValue>
</Meter>
<Meter value={6} max={25} threshold={8} good="up" valueText="6 of 25 bags left">
<MeterLabel>Clay</MeterLabel>
<MeterValue>6 of 25</MeterValue>
</Meter>
</>- Fits: list (its recipe); frame: sidebar-foot; settings: body.
- A meter is as wide as its caller, with no inset of its own. In a
Card variant="outline"set the meters in a<CardContent className="flex flex-col gap-4">under the CardHeader, never straight in the card or in a CardText. - width, padding, gap, border: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| value | number | The amount the bar fills to, held to min–max. |
| min? | number = 0 | The low end of the range. |
| max | number | The high end of the range — the limit; one not above min reads as min + 1. |
| threshold? | number | The value past which the meter warns (below it with good="up"): a tick marks it, and past it the fill turns to the warning colour. |
| good? | 'up' | 'down' = 'down' | Which way is good: down warns above the threshold (seats used); up below it (stock left). |
| tick? | boolean = true | Whether a tick marks the threshold; false keeps the warning without the mark. |
| valueText? | string | What the value means in words, where the number alone says too little. |
| overLabel? | string | The words read when the value is past the threshold ("Above the threshold" by default). |
| aria-label? | string | The bar's name when no MeterLabel names it. |
| children? | ReactNode | The caller's MeterLabel and MeterValue, drawn in the row above the bar. |
| Part | What it is |
|---|---|
| MeterLabel | What the meter measures, in the small quiet text style; it names the meter's bar |
| MeterValue | The used amount and the limit as the caller writes them ("18 of 25"), at the row's end |
- data-slot values (to select a part by): meter, meter-description, meter-header, meter-icon, meter-label, meter-tick, meter-value, meter-wrapper
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.