Physics Counter

PreviousNext

An animated number that springs toward its target value with natural easing and overshoot.

Monthly revenue

$1,240

Installation

pnpm dlx shadcn@latest add https://matos-ui.com/r/physics-counter.json

Usage

import { PhysicsCounter } from '@/components/matos-ui/physics-counter'
<PhysicsCounter value={1240} prefix="$" />

Reference

PhysicsCounter Props

PropTypeDefaultDescription
valuenumber-Target value the counter springs toward.
decimalsnumber0Number of decimal places to display.
prefixstring-Text rendered before the number (e.g. "$").
suffixstring-Text rendered after the number (e.g. "%").
size"sm" | "md" | "lg""md"Font size preset.
stiffnessnumber90Spring stiffness for the count animation.
dampingnumber18Spring damping for the count animation.