# Stat

A metric / dashboard Open Graph image with an eyebrow label, an oversized number, a trend pill, and a caption.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).





<ComponentPreview>
  <Stat />
</ComponentPreview>

## Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger value="cli">
      Command
    </TabsTrigger>

    <TabsTrigger value="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add https://ogimagecn.vercel.app/r/stat.json
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Copy and paste the following code into your project.
      </Step>

      <ComponentSource name="stat" title="components/og/stat.tsx" />

      <Step>
        Update the import paths to match your project setup.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

## Usage [#usage]

```tsx
import { ImageResponse } from "next/og";

import { Stat } from "@/components/og/stat";

export function GET() {
  return new ImageResponse(
    <Stat
      label="Images rendered"
      value="10M+"
      trend="+24%"
      caption="Open Graph images generated with next/og this year."
    />,
    { width: 1200, height: 630 }
  );
}
```

## API Reference [#api-reference]

### Stat [#stat]

| Prop      | Type     | Default |
| --------- | -------- | ------- |
| `label`   | `string` | `-`     |
| `value`   | `string` | `-`     |
| `caption` | `string` | `-`     |
| `trend`   | `string` | `-`     |
| `brand`   | `string` | `-`     |
| `accent`  | `string` | `-`     |
