react scrollspy component
npm install react-scrollspy-highlightsh
$ npm i react-scrollspy
`
Usage
`js
import Scrollspy from 'react-scrollspy'
...
`
Props
$3
Id list of target contents.
$3
Class name that apply to the navigation element paired with the content element in viewport.
$3
Class name that apply to the navigation elements that have been scrolled past [optional].
$3
HTML tag for Scrollspy component if you want to use other than ul [optional].
$3
Style attribute to be passed to the generated <ul/> element [optional].
$3
Offset value that adjusts to determine the elements are in the viewport [optional].
$3
Name of the element of scrollable container that can be used with querySelector [optional].
$3
Function to be executed when the active item has been updated [Optional].
$3
Enables highlighting of all navigation elements that are currently visible in the viewport [Optional].
Methods
$3
Remove event listener of scrollspy.
$3
Add event listener of scrollspy.
Development
`sh
$ git clone https://github.com/makotot/react-scrollspy.git
$ cd react-scrollspy
$ npm i
$ npm run start
``