countup.js
- Version 2.9.0
- Published
- 1.24 MB
- No dependencies
- MIT license
Install
npm i countup.js
yarn add countup.js
pnpm add countup.js
Overview
Animates a numerical value by counting to it
Index
Classes
Interfaces
Classes
class CountUp
class CountUp {}
constructor
constructor( target: string | HTMLElement | HTMLInputElement, endVal?: number, options?: CountUpOptions);
property count
count: (timestamp: number) => void;
property duration
duration: number;
property easeOutExpo
easeOutExpo: (t: number, b: number, c: number, d: number) => number;
property easingFn
easingFn?: (t: number, b: number, c: number, d: number) => number;
property el
el: HTMLElement | HTMLInputElement;
property error
error: string;
property formatNumber
formatNumber: (num: number) => string;
property formattingFn
formattingFn: (num: number) => string;
property frameVal
frameVal: number;
property once
once: boolean;
property options
options?: CountUpOptions;
property paused
paused: boolean;
property startVal
startVal: number;
property version
version: string;
method ensureNumber
ensureNumber: (n: any) => boolean;
method handleScroll
handleScroll: (self: CountUp) => void;
method parse
parse: (number: string) => number;
method pauseResume
pauseResume: () => void;
method printValue
printValue: (val: number) => void;
method reset
reset: () => void;
method start
start: (callback?: (args?: any) => any) => void;
method update
update: (newEndVal: string | number) => void;
method validateValue
validateValue: (value: string | number) => number;
Interfaces
interface CountUpOptions
interface CountUpOptions {}
property decimal
decimal?: string;
property decimalPlaces
decimalPlaces?: number;
property duration
duration?: number;
property easingFn
easingFn?: (t: number, b: number, c: number, d: number) => number;
property enableScrollSpy
enableScrollSpy?: boolean;
property formattingFn
formattingFn?: (n: number) => string;
property numerals
numerals?: string[];
property onCompleteCallback
onCompleteCallback?: () => any;
property onStartCallback
onStartCallback?: () => any;
property plugin
plugin?: CountUpPlugin;
property prefix
prefix?: string;
property scrollSpyDelay
scrollSpyDelay?: number;
property scrollSpyOnce
scrollSpyOnce?: boolean;
property separator
separator?: string;
property smartEasingAmount
smartEasingAmount?: number;
property smartEasingThreshold
smartEasingThreshold?: number;
property startVal
startVal?: number;
property suffix
suffix?: string;
property useEasing
useEasing?: boolean;
property useGrouping
useGrouping?: boolean;
property useIndianSeparators
useIndianSeparators?: boolean;
interface CountUpPlugin
interface CountUpPlugin {}
method render
render: (elem: HTMLElement, formatted: string) => void;
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (14)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/countup.js
.
- Markdown[](https://www.jsdocs.io/package/countup.js)
- HTML<a href="https://www.jsdocs.io/package/countup.js"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3907 ms. - Missing or incorrect documentation? Open an issue for this package.