---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Meter

A bar showing a measurement inside a known range, such as storage used or a quota, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `Meter`.

## Try it

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.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-meter.json --yes
```

```text
Add the Goop Meter to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
import { Meter, MeterLabel, MeterValue } from '@/components/ui/goop/meter';

function Usage() {
  return (
    <div className="flex w-full flex-col gap-4">
      <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>
    </div>
  );
}
```

- Fits: frame: sidebar-foot; settings: body.
- A meter is as wide as its caller, with no inset of its own. In a card set the meters in a `<CardContent className="flex flex-col gap-4">` under the CardHeader, never straight in the card or in a CardText.
- height, width, gap, corner, background, text: add no class for these.

## API reference

### Options

- `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.

### Parts

- `MeterLabel` — What the meter measures, at the line's start in the muted grey; it names the meter's bar
- `MeterValue` — The used amount and the limit as the caller writes them ("18 of 25"), at the line's end in the text colour, every figure one width

- data-slot values (to select a part by): meter, meter-description, meter-header, meter-icon, meter-label, meter-tick, meter-value, meter-wrapper

## Accessibility

- filled: the attribute data-filled

## 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.

## Related

- [Progress](/themes/meadow/components/progress): A bar that fills as work goes on, for an upload or a setup with a known end, or that sweeps while the end is unknown.
- [Stat](/themes/meadow/components/stat): A big figure with the word for what it counts, for a dashboard tile.
- [Status mark](/themes/meadow/components/status-mark): A small mark that shows an item's status, such as to do, in progress or done, in a list, a board or a record.
- [Priority mark](/themes/meadow/components/priority-mark): A small icon that shows an item's priority, from none to urgent, in a list, a board or a record.
