Number Ticker

Animate numbers to count up or down to a target number

Install using CLI

npm
pnpm
bun
yarn
npx shadcn-vue@latest add "https://inspira-ui.com/r/number-ticker.json"

Install Manually

Copy and paste the following code

NumberTicker.vue

API

Prop NameTypeDefaultDescription
valueint0Value to count to
directionup | downupDirection to count in
decimalPlacesnumber0Number of decimal places to show
delaynumber0Delay before counting (in milliseconds)
durationnumber1000Total duration for the entire animation (in milliseconds).
transitionTransitionPresetseaseOutCubicName of transition preset (https://vueuse.org/core/useTransition)

Credits