# Stats: featured metric with supporting results

> One prominent result paired with a vertical list of supporting figures.

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

## Use when
- One result deserves more emphasis than the other measures
- A small group of related metrics supports a concise story

## Avoid when
- Every figure should have equal visual weight; use stats-row

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

## Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| id | `string` | "stats-highlight" | no | Unique section ID prefix. |
| eyebrow | `string` | "A closer look" | no | Label above the section heading. |
| title | `string` | demo heading | no | Heading for the results. |
| description | `string` | demo copy | no | Context for the metrics; the default identifies them as illustrative. |
| headingLevel | `1 \| 2 \| 3` | 2 | no | Section heading level. |
| primary | `{ value: string; label: string; detail: string }` | example metric | no | Featured result and context; replace the example with verified information. |
| metrics | `{ value: string; label: string }[]` | 3 example metrics | no | Supporting figures and their labels. |
| class | `string` |  | no | Additional section classes. |

## Accessibility
- Labels and figures are expressed as description lists so values retain their context.
- The default figures are explicitly marked as examples and must be replaced with real evidence.

## Agent prompts

### Install and use

Install the Haze UI block "Stats: featured metric with supporting results" with `npx shadcn@latest add @haze/stats-highlight`. 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 StatsHighlight from "@/components/haze/blocks/stats-highlight.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-highlight.md

### Customize with real content

Adapt the Haze stats-highlight block for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, headingLevel, primary, metrics, class. Keep the layout, the heading level rules and these accessibility details: Labels and figures are expressed as description lists so values retain their context. The default figures are explicitly marked as examples and must be replaced with real evidence. Do not add raw color classes; use the Haze tokens.

### Choose the right block

Before using stats-highlight, check it fits: use it when one result deserves more emphasis than the other measures; a small group of related metrics supports a concise story. Avoid it when every figure should have equal visual weight; use stats-row. Alternatives: @haze/stats-row.

## Example requests that should lead here
- Highlight one customer outcome beside three supporting statistics

## Source

```astro
---
import { cn } from "../../../lib/haze/utils";

interface Props {
  id?: string;
  eyebrow?: string;
  title?: string;
  description?: string;
  headingLevel?: 1 | 2 | 3;
  primary?: { value: string; label: string; detail: string };
  metrics?: { value: string; label: string }[];
  class?: string;
}

const {
  id = "stats-highlight",
  eyebrow = "A closer look",
  title = "Small improvements, shared across the team",
  description = "Illustrative figures show how a featured result can sit alongside supporting measures.",
  headingLevel = 2,
  primary = { value: "4.8 hrs", label: "saved per person each week", detail: "Example result from a fictional customer survey." },
  metrics = [
    { value: "82%", label: "found project updates more easily" },
    { value: "3×", label: "faster to find a decision" },
    { value: "24", label: "teams in the example survey" },
  ],
  class: className,
} = Astro.props;
const Heading = ({ 1: "h1", 2: "h2", 3: "h3" } as const)[headingLevel];
---

<section aria-labelledby={`${id}-title`} class={cn("bg-background px-6 py-20 sm:py-24", className)}>
  <div class="mx-auto max-w-6xl">
    <div class="max-w-2xl">
      <p class="text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">{eyebrow}</p>
      <Heading id={`${id}-title`} class="mt-3 text-3xl/9 font-semibold tracking-tight text-balance text-foreground sm:text-4xl/11">{title}</Heading>
      <p class="mt-4 text-base/7 text-pretty text-muted-foreground">{description}</p>
    </div>
    <div class="mt-12 grid overflow-hidden rounded-2xl border border-border bg-card lg:grid-cols-2">
      <dl class="border-b border-border p-7 sm:p-10 lg:border-r lg:border-b-0">
        <dt class="text-sm/6 font-medium text-muted-foreground">{primary.label}</dt>
        <dd class="mt-4 text-5xl/[1.1] font-semibold tracking-tighter text-foreground tabular-nums sm:text-6xl/[1.1]">{primary.value}</dd>
        <dd class="mt-5 max-w-sm text-sm/6 text-muted-foreground">{primary.detail}</dd>
      </dl>
      <dl class="grid divide-y divide-border">
        {metrics.map((metric) => (
          <div class="grid gap-2 px-7 py-5 sm:grid-cols-[8rem_1fr] sm:items-center sm:gap-4 sm:px-10">
            <dt class="text-sm/6 text-muted-foreground sm:order-2">{metric.label}</dt>
            <dd class="text-2xl/8 font-semibold tracking-tight text-foreground tabular-nums sm:order-1">{metric.value}</dd>
          </div>
        ))}
      </dl>
    </div>
  </div>
</section>
```
