Stats Counter

Motion

A single stat that counts up from zero to its value once it is in view, with a label below. Combine several in a row for landing page metrics.

src/registry/premium/stats-counter.tsx/r/stats-counter.json

Installation#

bash
npx shadcn@latest add @minidev/stats-counter

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/stats-counter.json

Usage#

tsx
import { StatsCounter } from "@/components/ui/stats-counter"

export function Example() {
  return (
    <StatsCounter value={400} label="Components+" />
  )
}

API reference#

StatsCounter props
PropTypeDefault
valuenumber12400
labelstring"invoices paid this month"
classNamestring-

Dependencies#

npm

motion

Built from

No other MiniDev files

Examples#

All Animated React components

Learn more