useCountUp
Implements count-up functionality with customizable settings.
useCountUp
Installation
Usage
API
useCountup
Implements a count-up functionality.
Parameters
| Name | Type | Description |
|---|---|---|
| countStart | number | The starting count value. |
| intervalMs | number | The interval in milliseconds at which the count-up updates. |
| countStop | number | The count value at which the count-up stops. |
Returns
| Name | Type | Description |
|---|---|---|
| count | number | The current count value. |
| controllers | CountupControllers | An object containing functions to start, stop, and reset the count-up. |
CountupOptions
| Name | Type | Description |
|---|---|---|
| countStart | number | The starting count value. |
| intervalMs | number | The interval in milliseconds at which the count-up updates. |
| countStop | number | The count value at which the count-up stops. |
CountupControllers
| Name | Type | Description |
|---|---|---|
| startCountup | () => void | Starts the count-up. |
| stopCountup | () => void | Stops the count-up. |
| resetCountup | () => void | Resets the count-up to the initial value. |