Skip to content

hunghg255/reactjs-custom-scrollbar

Repository files navigation

reactjs-custom-scrollbar

npm version npm npm All Contributors

Installation

NPM

To install the latest stable version:

npm install --save reactjs-custom-scrollbar

Basic usage:

import React, { Component } from 'react';
import Sticky from 'reactjs-custom-scrollbar';

const array = [1, 2, 3, 4, 5, 6, 7, 8];
const App = () => {
  return (
    <div>
      <Scrollbar style={{ height: '100px', width: '200px' }} autoHide>
        <div>
          {array.map(a => (
            <div
              key={a}
              style={{
                width: '100px',
                height: '100px',
                background: 'yellow',
                display: 'flex',
                flex: 'none',
              }}
            >
              {a}
            </div>
          ))}
        </div>
      </Scrollbar>
    </div>
  );
};
}

About

Reactjs Scrollbar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published