# Stats with Card Layout

> A stats with card layout block.

A shadcn/ui block from the [@blocks-so](https://blocks.so) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/blocks-so/stats-03).

- Page, with a live preview: https://shadcn.exchange/r/blocks-so/stats-03
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/blocks-so/stats-03-light-0f5e4896b72cc4fb.png
- Registry item: https://blocks.so/r/stats-03.json
- Categories: stats
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://blocks.so/r/stats-03.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `card`

## Files

### `content/components/stats/stats-03.tsx`

```tsx
'use client';

import { Card, CardContent } from '@/components/ui/card';
import { cn } from '@/lib/utils';

const data = [
  {
    name: 'Unique visitors',
    stat: '10,450',
    change: '-12.5%',
    changeType: 'negative',
  },
  {
    name: 'Bounce rate',
    stat: '56.1%',
    change: '+1.8%',
    changeType: 'positive',
  },
  {
    name: 'Visit duration',
    stat: '5.2min',
    change: '+19.7%',
    changeType: 'positive',
  },
  {
    name: 'Conversion rate',
    stat: '3.2%',
    change: '-2.4%',
    changeType: 'negative',
  },
];

export default function Stats03() {
  return (
    <div className="flex w-full items-center justify-center p-10">
      <dl className="grid w-full grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4">
        {data.map((item) => (
          <Card className="p-6 py-4 shadow-2xs" key={item.name}>
            <CardContent className="p-0">
              <dt className="font-medium text-muted-foreground text-sm">
                {item.name}
              </dt>
              <dd className="mt-2 flex items-baseline space-x-2.5">
                <span className="font-semibold text-3xl text-foreground tabular-nums">
                  {item.stat}
                </span>
                <span
                  className={cn(
                    item.changeType === 'positive'
                      ? 'text-green-800 dark:text-green-400'
                      : 'text-red-800 dark:text-red-400',
                    'font-medium text-sm'
                  )}
                >
                  {item.change}
                </span>
              </dd>
            </CardContent>
          </Card>
        ))}
      </dl>
    </div>
  );
}
```
