# Stat Slide (/docs/components/stat-slide)

A statistics-focused slide with single, row, or grid layouts.

> 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 name="stat-slide-demo" />

### Installation [#installation]

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

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

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add @slidecn/stat-slide
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Install the following dependencies:
      </Step>

      ```bash
      npm install @revealjs/react
      ```

      <Step>
        Copy the component source into your project.
      </Step>

      <ComponentSource src="registry/slidecn/ui/stat-slide.tsx" title="components/slidecn/stat-slide.tsx" />

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

## Usage [#usage]

```tsx
import StatSlide from "@/components/slides/stat-slide";

function MyPresentation() {
  return (
    <Deck>
      <StatSlide
        title="Growth"
        layout="grid"
        stats={[
          { value: "10K", label: "Users", description: "Monthly active" },
          { value: "3x", label: "Growth", description: "Year over year" },
        ]}
      />
    </Deck>
  );
}
```

## API Reference [#api-reference]

### StatSlide [#statslide]

| Prop     | Type                          | Default    | Description         |
| -------- | ----------------------------- | ---------- | ------------------- |
| `title`  | `string`                      | -          | Slide heading       |
| `stats`  | `Stat[]`                      | required   | Array of statistics |
| `layout` | `"single" \| "row" \| "grid"` | `"single"` | Layout arrangement  |
| `notes`  | `string`                      | -          | Speaker notes       |

### Stat [#stat]

| Field         | Type     | Description             |
| ------------- | -------- | ----------------------- |
| `value`       | `string` | The statistic value     |
| `label`       | `string` | Label for the statistic |
| `description` | `string` | Optional description    |
