BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/dashboardblocks/animated-number

Animated Number

dashboardblocks/animated-number
FreeComponent

An animated number component.

Live preview

live · rendered by the registry
Rendered by dashboardblocks on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://dashboardblocks.com/r/animated-number.json

Source

registry/components/dashboardblocks/animated-number.tsxdashboardblocks.com/r/animated-number.json
1'use client'
2
3import { useAnimatedNumber } from '@/registry/hooks/use-animated-number'
4import { ReactNode } from 'react'
5
6interface AnimatedNumberProps {
7 /**
8 * The target value to animate to
9 */
10 value: number
11 /**
12 * Duration of the animation in milliseconds
13 * @default 1000
14 */
15 duration?: number
16 /**
17 * Easing function for the animation
18 * @default 'easeOut'
19 */
20 easing?: 'linear' | 'easeOut' | 'easeIn' | 'easeInOut' | 'spring'
21 /**
22 * Starting value for the animation
23 * @default 0
24 */
25 from?: number
26 /**
27 * Delay before starting animation in milliseconds
28 * @default 0
29 */
30 delay?: number
31 /**
32 * Custom formatter function
33 */
34 formatter?: (value: number) => ReactNode
35 /**
36 * Additional className for the wrapper span
37 */
38 className?: string
39}
40
41/**
42 * A component that animates a number from a start value to an end value,
43 * with viewport detection to only animate when visible.
44 */
45export function AnimatedNumber({
46 className,
47 delay = 0,
48 duration = 1000,
49 easing = 'easeOut',
50 formatter,
51 from = 0,
52 value: targetValue,
53}: AnimatedNumberProps) {
54 const { ref, value } = useAnimatedNumber(targetValue, {
55 delay,
56 duration,
57 easing,
58 from,
59 })
60
61 const displayValue = formatter ? formatter(value) : value.toLocaleString()
62
63 return (
64 <span ref={ref as React.RefObject<HTMLSpanElement>} className={className}>
65 {displayValue}
66 </span>
67 )
68}

What it pulls in

Other registry items

  • https://dashboardblocks.com/r/use-animated-number.json

Files it writes

  • registry/components/dashboardblocks/animated-number.tsx

Facts

Registry
dashboardblocks
Type
registry:component
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

Docs on dashboardblocks dashboardblocks.com LGLabGreg/dashboardblocks on GitHub Raw registry item This item as JSON

More from dashboardblocks

All 36 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Activity Feedactivity-feeddashboardblocksComponentsFree1 dep
activity-feed-01activity-feed-01dashboardblocksComponentsFree1 dep
activity-feed-02activity-feed-02dashboardblocksComponentsFree1 dep
activity-feed-03activity-feed-03dashboardblocksComponentsFree1 dep
activity-feed-04activity-feed-04dashboardblocksComponentsFree1 dep
activity-feed-05activity-feed-05dashboardblocksComponentsFree1 dep
Animated Waveanimated-wavedashboardblocksComponentsFreeno deps
area-chart-kpi-01area-chart-kpi-01dashboardblocksComponentsFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex