Skip to content

react-absolute is a react wrapper that works like a combination of position absolute and fixed

Notifications You must be signed in to change notification settings

ccencisoj/react-absoluted

Repository files navigation

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.

Bubble 1

Image with position fixed Bubble 2

Image wrapped with Absoluted "Bubble 3"

About

react-absolute is a react wrapper that works like a combination of position absolute and fixed

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published