2.2.0 • Published 1 year ago

react-scroll-design v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

A React replacement for the browser's native scrollbar.

npm npm version download npm bundle size dumi

Document

English document | 中文文档

Install

npm install react-scroll-design
yarn add react-scroll-design
pnpm add react-scroll-design

Usage

This is the most basic way to use it, please check the document for more usage examples.

import { ScrollContainer } from 'react-scroll-design';

export default () => (
  <ScrollContainer height={400}>
    {/* Simply replace the content with your own. */}
    {new Array(20).fill(1).map((item, index) => {
      return (
        <div key={index} className="example-scrollbar-demo-item">
          {index + 1}
        </div>
      );
    })}
  </ScrollContainer>
);