vue-countup-v3 is a Vue 3 component that wraps the popular countUp.js library (specifically version 2.6.2), extending its functionality with additional features. It provides an animated counting experience for numerical values within Vue applications. The package is currently at version 1.4.2, indicating active development with recent minor updates. It serves as a convenient and optimized way to integrate dynamic number animations into Vue 3 projects without directly managing the countUp.js instance. Key differentiators include its native Vue 3 component interface, built-in reactivity, and support for Vue-specific patterns like slots for prefix/suffix customization.
npm install vue-countup-v3Verified import paths — ran on the pinned version, not inferred.
Demonstrates a comprehensive usage of the CountUp component including reactive end values, custom options, loop/delay props, and event handling for initialization and completion.
Add 'vue-countup-v3' to the `build.transpile` array in your `nuxt.config.ts` file: `build: { transpile: ['vue-countup-v3'] }`.Apply client-side directives such as `client:load` and `client:only` to the component in your Astro templates (e.g., `<CountUp client:load client:only end-val={2000} />`).Refer to the `countUp.js` documentation for available options and provide them as a JavaScript object to the `:options` prop of the `CountUp` component.
If an initial delay before the first animation is required, implement it externally using Vue's reactivity system (e.g., `setTimeout`) to conditionally render the component or update its `end-val` after the desired delay.
Add 'vue-countup-v3' to the `transpile` array in your `nuxt.config.ts`: `export default defineNuxtConfig({ build: { transpile: ['vue-countup-v3'] } });`Add `client:load client:only` directives to your `CountUp` component within Astro: `<CountUp client:load client:only :end-val="2000" />`
Change your type imports from `import { ICountUp, CountUpOptions } from 'vue-countup-v3'` to `import type { ICountUp, CountUpOptions } from 'vue-countup-v3'`.