Skip to content

A react component that triggers an event when an html element changes size.

Notifications You must be signed in to change notification settings

globaljake/react-resize-to-aspect-ratio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-resize-to-aspect-ratio

A react component that triggers an event when an element changes size. It also can automatically keep a given aspect ratio when the element resizes.

This react component is based on element-resize-event

Example Use:

npm i react-resize-to-aspect-ratio -S
import Resize from 'react-resize-to-aspect-ratio';

<Resize aspectRatio="16:9">
  <div style={{ width: '100%' }}>
    Hello World
  </div>
</Resize>

About

A react component that triggers an event when an html element changes size.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published