GitHub - closeio/react-custom-scroller: Super simple React component for creating a custom scrollbar cross-browser and cross-devices.

2 min read Original article ↗

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Super simple React component for creating a custom scrollbar cross-browser and cross-devices.

License

MIT license

35 stars 9 forks Branches Tags Activity

Notifications You must be signed in to change notification settings

Repository files navigation

react-custom-scroller

NPM JavaScript Style Guide

Super simple React component for creating a custom scrollbar cross-browser and cross-devices.

Check the live DEMO.

Interested in working on projects like this? Close is looking for great engineers to join our team!

Install

yarn add react-custom-scroller

Benefits

  • Extremely lightweight (less than 2KB minzipped).
  • It uses the native scroll events, so all the events work and are smooth (mouse wheel, space, page down, page up, arrows etc).
  • No other 3rd-party dependencies.
  • The performance is excellent!

Usage

import React from 'react';
import CustomScroller from 'react-custom-scroller';
import 'react-custom-scroller/dist/index.css';

const MyScrollableDiv = () => (
  <CustomScroller>Content goes here.</CustomScroller>
);

License

MIT © Close