Skip to content

pomber/react-fit-to-viewport

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

react-fit-to-viewport

Automatically scales the content to fit it inside the viewport. It also works with server-side rendering.

$ yarn add react-fit-to-viewport
<FitToViewport width={800} height={600} minZoom={0} maxZoom={1}>
  {stuff}
</FitToViewport>