mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
23 lines
622 B
TypeScript
23 lines
622 B
TypeScript
import { AnimatedNumber } from "@hanzo/ui-shadcn/animation/animated-number"
|
|
|
|
export default function AnimatedNumberDemo() {
|
|
return (
|
|
<div className="flex min-h-[400px] items-center justify-center p-8">
|
|
<div className="text-center">
|
|
<div className="mb-4 text-sm text-muted-foreground">Revenue</div>
|
|
<AnimatedNumber
|
|
value={123456}
|
|
from={0}
|
|
prefix="$"
|
|
className="text-5xl font-bold"
|
|
duration={2000}
|
|
onComplete={() => {}}
|
|
style={{}}
|
|
separator=","
|
|
hoverValue={150000}
|
|
/>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|