- Notifications
You must be signed in to change notification settings - Fork6
A React Hook that allows you to detect X and Y overflow
License
NotificationsYou must be signed in to change notification settings
amorriscode/use-overflow
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A React Hook that allows you to detect X and Y overflow.
npm install --save use-overflowORyarn add use-overflow
import*asReactfrom'react'import{useOverflow}from'use-overflow'constExample=()=>{consthorizontalRef=React.useRef(null);const{ refXOverflowing, refXScrollBegin, refXScrollEnd}=useOverflow(horizontalRef);constverticalRef=React.useRef(null);const{ refYOverflowing, refYScrollBegin, refYScrollEnd}=useOverflow(verticalRef);return(<div>{/* Conditional do stuff based on overflow! */}</div>)}
MIT ©amorriscode
This hook is created usingcreate-react-hook.
About
A React Hook that allows you to detect X and Y overflow
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.