Skip to content

streamich/react-size-sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React <SizeSensor />

React component that fires resize events if size of its children changes.

import {SizeSensor} from 'resize-sensor';

<SizeSensor onSize={(width, height) => {}} onResize={(width, height) => {}}>
    {/* something to track size of */}
</SizeSensor>
  • onSize - Fires with the initial size of the component when component renders for the first time.
  • onResize - Fires every time component's width or height changes.
  • onWidth - Fires every time component's width changes.
  • onHeight - Fires every time component's height changes.

About

React component that detect children size

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •