react-numscroll

1.0.1 • Public • Published

React Number Scrolling

Install

npm install react-numscroll or yarn add react-numscroll

Quickstart

import React, { useState, useEffect } from 'react';
import NumberScroll from 'react-numscroll';

export default () => {
  const [count, setCount] = useState(10);

  useEffect(() => {
    setInterval(() => {
      setCount(count => ++count);
    }, 2000);
  }, []);

  return <NumberScroll number={count} itemWidth={50} itemHeight={60} />;
};

API

Prop Type Required Description
number number Yes what does number come in
itemWidth number No Individual number width.
Default: 50
itemHeight number No Individual number height.
Default: 60
numSize number No Individual number size. Default: 32
numColor string No Number color.
Default: #fff
bgColor string No Background color
Default:#0089e9
border string No Individual number border. Default: 1px solid #f9f9f9

/react-numscroll/

    Package Sidebar

    Install

    npm i react-numscroll

    Weekly Downloads

    1

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    201 kB

    Total Files

    7

    Last publish

    Collaborators

    • ruoyuwang