react-stickyt

0.1.2 • Public • Published

React Stickyt

React Stickyt is just a HOC that wraps your components to let them stick to the window.

Usage

Let's say you are writing the component App. You can write like this:

import React from 'react';
import Sticky from 'react-stickyt';
 
const App = () => <div>
  ...
  <Sticky>
    <YourComponent/>
    Some text
  </Sticky>
  ...
</div>;
 
export default App;

APIs

Pass a numberic offset prop in px to shift from the top the sticked content.

Keywords

none

Install

npm i react-stickyt

DownloadsWeekly Downloads

3

Version

0.1.2

License

none

Last publish

Collaborators

  • zorahrel