react-absoluted
v1.1.22
Published
react-absolute is a react wrapper that **works like a combination of position absolute and fixed**
Downloads
7
Readme
React-Absoluted
react-absolute is a react wrapper that works like a combination of position absolute and fixed
Elements with position absolute:
- They generate scroll when the size is greater than the viewport
- They are fixed in the defined position with respect to the parent
Elements with position fixed:
- They do not generate scroll when the size is greater than the viewport
- They are fixed in the defined position with respect to the viewport
This wrapper is fixed in the defined position with respect to the parent and does not generate a scroll when the size is greater than the viewport.
Getting started
npm install react-absolute
Import Absoluted
import Absoluted from 'react-absoluted';
// ...
Wrap the elementos
<Absoluted>
<img src="/images/bubble1.svg" alt="Image with size greater than the viewport"/>
</Absoluted>
Example
To understand the example look at the scroll
Image with position absolute.
Image with position fixed
Image wrapped with Absoluted