CountPlugin
The CountPlugin animates an number counting. It uses the innerText from the target elements. (children)
It can be called with the "count" property which takes an number or an object with the following properties:
Name | Type |
---|---|
value | number |
format | () => (value) => string |
import { Controls, PlayState, Tween } from 'react-gsap';
Integer
By default the count value will be parsed to an integer.
0
Custom format function
You can use your own custom format function.
10.00
Percentage Bar
0 %