Counter
Animated flip-clock style counter that animates from zero to the target amount. Each digit flips individually with a smooth animation effect.Import
Props
Target number to count up to (animates from amount-10 or 0)
Height in pixels for each digit block
Width in pixels for each digit block
Text color for the digits
Background color for each digit block
Border/divider color between digit segments
Font size in pixels for the numbers
Usage
Notes
- Animation starts from
amount - 10(or 0 if amount < 10) - Each digit flips independently at 400ms intervals
- Uses CSS custom properties for styling
- Animation automatically stops when target is reached
- Displays leading zeros to maintain consistent width
- Re-triggers animation when
amountprop changes