2.2.0 • Published 1 year ago
react-scroll-design v2.2.0
A React replacement for the browser's native scrollbar.
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>
);