Skip to content

delpikye-v/react-smooth-scrollbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

react-smooth-scrollbar-z


LIVE EXAMPLE

Description


Usage

npm install react-smooth-scrollbar-z

Import the module in the place you want to use:

import Scrollbar from 'react-smooth-scrollbar-z'

Snippet

simple
    // const root = useRef(null);
    <Scrollbar
        // ref={root}
        alwaysShowTracks
        overEffect={"bounce" | "glow"} // plugin = overscroll
    >
        { something1...  }
    </Scrollbar>

    <Scrollbar
        alwaysShowTracks
        plugins={{
          overscroll: {
            effect: 'bounce',
          } as const
        }}>
        { something1...  }
    </Scrollbar>

    // dosomething
    <Scrollbar
        alwaysShowTracks
        height="100px"
        width="200px"
        damping={number}
        thumbMinSize={number}
        renderByPixels={boolean}
        continuousScrolling={boolean}
        wheelEventTarget={element}
        // overEffect={"bounce" | "glow"}
        onScroll={() => console.log('pabcd')}
      >
      { something1...  }
    </Scrollbar>


plugins

Options for plugins, see Plugin.

options

ScrollbarOptions: from smooth-scrollbar/interfaces

RUN

LIVE EXAMPLE

npm install
npm run dev
npm run start

License

MIT