# Number Roll Spin Demo

> Example usage of Number Roll.

A shadcn/ui block from the [@mizzle](https://mizzle.saddy.me/?utm_source=shadcn.exchange) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/mizzle/number-roll-spin-demo).

- Page, with a live preview: https://shadcn.exchange/r/mizzle/number-roll-spin-demo
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/mizzle/number-roll-spin-demo-light-38863bac46cdbdeb.png
- Registry item: https://mizzle.saddy.me/r/number-roll-spin-demo.json
- Categories: text
- Listed: 2026-10-17, source last changed 2026-10-17

## Install

```bash
npx shadcn@latest add https://shadcn.exchange/r/mizzle/number-roll-spin-demo.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: `@mizzle/number-roll`

## Notes from the registry

Docs: https://mizzle.saddy.me/docs/components/text/number-roll

## Files

### `registry/demos/text/number-roll-spin-demo.tsx`

```tsx
import { NumberRoll } from "@/components/mizzle/text/number-roll"

const STATS = [
  {
    label: "Uptime",
    value: 0.9998,
    format: { style: "percent", minimumFractionDigits: 2 },
  },
  { label: "Deploys", value: 1284, format: {} },
  {
    label: "Median",
    value: 42,
    format: { style: "unit", unit: "millisecond" },
  },
] as const

export default function NumberRollSpinDemo() {
  return (
    <dl className="flex gap-10">
      {STATS.map((stat) => (
        <div key={stat.label} className="flex flex-col gap-1">
          <dt className="text-xs text-muted-foreground">{stat.label}</dt>
          <dd className="text-xl font-medium tracking-[-0.01em] text-foreground">
            <NumberRoll
              value={stat.value}
              format={stat.format}
              locale="en-US"
              inView={false}
              spin={1}
              stagger={0.09}
            />
          </dd>
        </div>
      ))}
    </dl>
  )
}
```
