Skip to content

emreisik95/scroll-level

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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);
}

About

A lightweight (1 kB) package to easily track scroll percentage in React.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published