Skip to content

MazAnimatedCounter

MazAnimatedCounter is a standalone component that allows you to animate a number from 0 to a specific value. Fully animated with CSS.

Basic usage

7003870038

duration

You can set the duration of the animation with the duration prop. The default value is 1000 ms.

40004000

prefix and suffix

You can add a prefix and a suffix to the number with props or slots.

Be careful, you can't use both at the same time.

Prefixed


$20$20
$20$20

Suffixed


100%100%
100%100%

Props

NameDescriptionTypeRequiredDefault
countThe number to animatenumberYesundefined
durationDuration of the animation in millisecondsnumberNo1000
prefixSuffix to display next to the numberstringNoundefined
suffixSuffix to display next to the numberstringNoundefined
delayDelay before the animation starts in millisecondsnumberNo100
oncePlay the animation only oncebooleanNotrue

Slots

NameDescriptionBindings
prefix
suffix