react-overflow

0.2.1 • Public • Published

react-overflow

npm version GitHub license

A React component that detects when it's overflowed by its content.

Installation

Install react-overflow using npm:

npm install --save react-overflow

Usage

import { OverflowDetector } from 'react-overflow';
 
function handleOverflowChange(isOverflowed) {
  console.log(isOverflowed);
}
 
<OverflowDetector
  onOverflowChange={handleOverflowChange}
  style={{ width: '100px' }}
>
  <div style={{ width: '200px' }}>Overflowing</div>
</OverflowDetector>

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i react-overflow

Weekly Downloads

2,148

Version

0.2.1

License

MIT

Unpacked Size

11.8 kB

Total Files

6

Last publish

Collaborators

  • nickuraltsev