Components
Animated Number
Numbers and amounts that count smoothly to each new value.
Net this month$0
Entries0
Import
import { AnimatedNumber, AnimatedMoney } from '@rinzai/zen';API reference
<AnimatedNumber>
A number that counts smoothly to each new value (and up from zero when it first appears). Rounds to whole numbers while moving, so money in minor units never shows fractions. Instant with reduced motion.
| Prop | Type | Default |
|---|---|---|
valueRequired | number | — |
className | string | — |
durationMilliseconds per change. | number | 650 |
formatTurns the (whole) number into text, e.g. with Intl.NumberFormat. | ((value: number) => string) | — |
fromZeroCount up from zero when first shown (default), or start at the value. | boolean | true |
<AnimatedMoney>
An amount of money (minor units) that counts to each new value.
| Prop | Type | Default |
|---|---|---|
currencyRequired | string | — |
localeRequired | string | — |
valueRequired | number | — |
className | string | — |
durationMilliseconds per change. | number | — |
fromZeroCount up from zero when first shown (default), or start at the value. | boolean | — |
showDecimals | boolean | false |