A number that counts up to its value once it scrolls into view.
Import it from rei-kit/motion:
import { CountUp } from 'rei-kit/motion'
Open CountUp in the live documentation, where every prop below is a control you can change, in four materials and ten palettes.
<script setup lang="ts">
import { CountUp } from 'rei-kit/motion'
</script>
<template>
<CountUp :value="12480" />
</template>
| Prop | Type | Required or default | What it is for |
|---|---|---|---|
value | number | yes | The number to count to. Change it and it counts on from where it is. |
from | number | 0 | Where the first count starts. |
duration | number | 1600 | How long a count takes, in milliseconds. |
format | Intl.NumberFormatOptions | undefined | Passed to `Intl.NumberFormat`. Set `maximumFractionDigits` to count in decimals. |
locale | string | undefined | A BCP 47 tag. Unset, the kit's active formatting locale. |
rei-kit is an accessible Vue 3 and Tailwind CSS 4 component library: 106 components, themed by role rather than by colour on three independent axes — ten WCAG-checked palettes, four materials and light or dark, each switched with one attribute. Typed, tested, SSR-safe, no runtime dependencies, MIT.