# Stats: four metrics with hairline dividers

> Heading and caption over four large metrics separated by hairlines, two by two on mobile and in one row from lg.

- Kind: block · Category: Stats · Interactivity: none
- Install: `npx shadcn@latest add @haze/stats-row`
- File: `src/components/haze/blocks/stats-row.astro`
- npm dependencies: none
- Registry dependencies: 
- Docs page: https://hazeui.com/blocks/stats-row

## Use when
- You have three or four hard numbers that prove traction
- Between features and testimonials on a landing page

## Avoid when
- The numbers need charts or trends to make sense; use a chart-based stats block

## Alternatives
- [logos-row](https://hazeui.com/blocks/logos-row.md)

## Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| title | `string` | demo heading | no | Section heading (h2). |
| description | `string` | demo caption | no | Caption that dates or qualifies the numbers. |
| stats | `{ value: string; label: string }[]` | 4 demo stats | no | Metric value and its label. |

## Accessibility
- Metrics use a description list (dl/dt/dd), so each value is announced with its label.
- The hairline grid expects a count that fills its rows: a multiple of 2, and of 4 from lg.
- The label is visually below the value but comes first in the DOM, so screen readers read it as label then value.

## Agent prompts

### Install and use

Install the Haze UI block "Stats: four metrics with hairline dividers" with `npx shadcn@latest add @haze/stats-row`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "https://hazeui.com/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import StatsRow from "@/components/haze/blocks/stats-row.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: https://hazeui.com/blocks/stats-row.md

### Customize with real content

Adapt the Haze stats-row block for our product. Replace the demo values of these props with our real content: title, description, stats. Keep the layout, the heading level rules and these accessibility details: Metrics use a description list (dl/dt/dd), so each value is announced with its label. The hairline grid expects a count that fills its rows: a multiple of 2, and of 4 from lg. The label is visually below the value but comes first in the DOM, so screen readers read it as label then value. Do not add raw color classes; use the Haze tokens.

### Choose the right block

Before using stats-row, check it fits: use it when you have three or four hard numbers that prove traction; between features and testimonials on a landing page. Avoid it when the numbers need charts or trends to make sense; use a chart-based stats block. Alternatives: @haze/logos-row.

## Example requests that should lead here
- Add a row of four big statistics with labels
- Show our traction numbers: teams, uptime, rating

## Source

```astro
---
interface Props {
  title?: string;
  description?: string;
  stats?: { value: string; label: string }[];
}

const {
  title = "Built for teams that ship every week",
  description = "Numbers from the last twelve months across all workspaces.",
  stats = [
    { value: "12,400+", label: "teams on Driftwork" },
    { value: "38%", label: "faster cycle time on average" },
    { value: "99.99%", label: "uptime over the past year" },
    { value: "4.9/5", label: "average rating from 2,100 reviews" },
  ],
} = Astro.props;
---

<section aria-labelledby="stats-row-title" class="bg-background px-6 py-20 sm:py-24">
  <div class="mx-auto max-w-6xl">
    <div class="max-w-2xl">
      <h2 id="stats-row-title" class="text-3xl/9 font-semibold tracking-tight text-balance text-foreground sm:text-4xl/11">{title}</h2>
      <p class="mt-4 text-base/7 text-pretty text-muted-foreground">{description}</p>
    </div>
    <dl class="mt-12 grid grid-cols-2 gap-px overflow-hidden border-y border-border bg-border lg:grid-cols-4 lg:gap-0 lg:divide-x lg:divide-border lg:bg-transparent">
      {
        stats.map((stat) => (
          <div class="flex flex-col-reverse justify-end gap-2 bg-background px-3 py-8 sm:px-6 lg:py-10 lg:first:pl-0 lg:last:pr-6">
            <dt class="text-sm/6 text-muted-foreground">{stat.label}</dt>
            <dd class="text-3xl/9 font-semibold tracking-tight text-foreground sm:text-4xl/10 tabular-nums">{stat.value}</dd>
          </div>
        ))
      }
    </dl>
  </div>
</section>
```
