Skip to content

kaichii/use-detect-overflow

Repository files navigation

use-detect-overflow

React Hook for detecting overflow 

NPM NPM Downloads JavaScript Style Guide

Live Example

Install

npm install --save use-detect-overflow
// OR
yarn add use-detect-overflow
// OR
pnpm add use-detect-overflow

Usage

import * as React from 'react';

import { useDetectOverflow } from 'use-detect-overflow';

const Example = () => {
  const [ref, { overflowX, overflowY }] = useDetectOverflow();
  return <div ref={ref}>...</div>;
};

License

MIT © kaichii


This hook is created using create-react-hook.