---
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/"
---

# Stat

A big figure with the word for what it counts, for a dashboard tile, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `Stat`.

## Try it

Change the number (42 to 43 moves one digit) and the label.

The numbers are ours.

## When to use

- A big figure with the word for what it counts, for a dashboard tile.
- Also called: KPI or metric card.

## When not to use

- To show how much a figure rose or fell, put a status Badge beside it.

## 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 Stat 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-stat.json --yes
```

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

## Usage

```tsx
import { Badge } from '@/components/ui/goop/badge';
import { Stat, StatGroup, StatLabel, StatTile, StatValue } from '@/components/ui/goop/stat';

function SiteNumbers({ sessions }: { sessions: number }) {
  return (
    <>
      <Stat>
        <StatValue>{sessions}</StatValue>
        <StatLabel>sessions</StatLabel>
      </Stat>
      <StatGroup aria-label="The last 30 days">
        <StatTile
          label="Sessions run"
          value="1,284"
          trend={
            <Badge variant="success" stateLabel="Up">
              +6%
            </Badge>
          }
          comparison="vs prior 30 days"
          description="52 at new sites"
        />
        <StatTile label="No-shows" value="2.1%" description="3 of 142 sessions missed" />
      </StatGroup>
    </>
  );
}
```

- Fits: overview (its recipe).
- width, gap, text: add no class for these.

## API reference

### Parts

- `StatValue` — The number, as the caller wants it read (a string or a number; `0` is drawn)
- `StatLabel` — The word after the number that says what it counts
- `StatTile` — A metric tile; label: ReactNode — The title over the figure: what it counts; value: ReactNode — The figure (a string or a number; `0` is drawn); trend?: ReactNode — The change under the figure: a status Badge; comparison?: ReactNode — What the change compares with ("vs prior 30 days"); description?: ReactNode — The sub-line at the tile's foot ("4 new"); spark?: ReactNode — A small chart at the foot's end
- `StatGroup` — A row of metric tiles that wraps on a narrow width

- data-slot values (to select a part by): stat, stat-group, stat-group-list, stat-label, stat-tile, stat-tile-content, stat-tile-description, stat-tile-footer, stat-tile-row, stat-tile-spark, stat-tile-text, stat-value, stat-value-item

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

- [Badge](/themes/meadow/components/badge): A small label with a word, an icon or a count, for a status, a tag, a date or a count beside a title or in a row.
- [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.
- [Trend chip](/themes/meadow/components/trend-chip): A small chip with how much a figure rose or fell.
