react-scrollspy-ez
v1.0.2
Published
simple scrollspy component for react
Downloads
24
Readme
react-scrollspy-ez
simple scrollspy component for react
Demo
Install
npm install --save react-scrollspy-ez
Usage
import * as React from "react";
import Scrollspy from "react-scrollspy-ez";
class Example extends React.Component {
render() {
return <Scrollspy ids={["one", "two"]} />;
}
}
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