react-nano-scrollbar
v0.0.4
Published
<h1 align="center"> react-nano-scrollbar </h1>
Downloads
75
Maintainers
Readme
react-nano-scrollbar is a minimalist scrollbar library for React, inspired by perfect-scrollbar, implemented inside of React component with no external dependencies.
Installation
Install react-nano-scrollbar
with either npm or yarn:
yarn add react-nano-scrollbar
# or
npm install react-nano-scrollbar
Then include the CSS with:
/* In your CSS/SCSS file: */
@import 'react-nano-scrollbar/dist/index.css';
or:
// In your JS/TS file (assuming your bundler supports loading CSS files):
import 'react-nano-scrollbar/dist/index.css';
Example usage
import { ScrollArea } from 'react-nano-scrollbar';
return (
<ScrollArea className="example">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed malesuada
felis libero, maximus interdum lorem hendrerit ornare. In nisl nunc,
finibus non gravida eu, dictum vitae metus. Proin feugiat enim purus, ac
auctor elit facilisis et. Etiam sollicitudin lacus sed sollicitudin
mattis. Maecenas nulla est, malesuada luctus fringilla vitae, feugiat sit
amet massa. Sed ut tellus gravida, lobortis nunc vel, semper justo. Aenean
sapien tellus, consectetur ac quam ut, molestie convallis sapien.
</p>
</ScrollArea>
);