react-scrollspy-ez
simple scrollspy component for react
Demo
Install
npm install --save react-scrollspy-ez
Usage
; ;
Options
ids
- domid
of the page element to trackoffset
- scroll offset (in pixels), if your page elements have lots of padding. Default is2
.itemContainerClassName
- class for the whole scrollspy menuactiveItemClassName
- class for the active menu itemcontainerElement
- a JSX element for the whole menu (default isul
)itemElement
- a JSX element for each menu item, default isli
License
MIT © telega