Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/javierbyte/react-number-easing

React component to interpolate rendering of numbers in the frontend.
https://github.com/javierbyte/react-number-easing

animation design-tool easing frontend react react-number-easing transition

Last synced: 5 days ago
JSON representation

React component to interpolate rendering of numbers in the frontend.

Awesome Lists containing this project

README

        

# [React Number Easing](https://javier.xyz/react-number-easing/)

React component for fancy number transitions.

[› Online Demo](https://javier.xyz/react-number-easing/).

[![react-number-easing screenshot](assets/number-easing-infinite.gif)](https://javier.xyz/react-number-easing/)

## Installation

```js
npm install react-number-easing --save
```

## Usage.

```jsx
import NumberEasing from 'react-number-easing';

```

### Props

* `value`: The value that you want to display at the end of the animation. This is the target value.
* `[speed]`: How fast do you want to finish the animation? Defaults to 500ms.
* `[ease]`: The easing equation for the animation. Defaults to `quintInOut`. You can choose from [mattdesl/eases](https://github.com/mattdesl/eases/blob/master/index.js).
* `[decimals]`: Number of decimal numbers to show.
* `[customFunctionRender]`: Function that replaces the default `Number(value).toString(decimals)` render function. It takes one argument `currentRenderValue` which is a `Float` with the current eased value to render and should return a `string`.