useScrollLevel - a custom React hook
A lightweight (1 kB) package to easily track scroll percentage in React.js
Install
npm install react-scroll-level
Example
import React from 'react'
import { useScrollLevel } from 'react-scroll-level'
function App() {
const { scrollHeight, scrollWidth } = useScrollLevel();
console.log('scrollHeight:', scrollHeight);
console.log('scrollWidth:', scrollWidth);
}
Keywords
reactscrolllevelscroll percentagescroll levelscroll percentage of document heightscroll percentage of document widthscroll percentage of window heightscroll percentage of window widthscroll percentage of document height or widthscroll percentage of window height or widthscroll percentage finderscroll percentage finder for reactscroll percentage finder for reactjs