Skip to content

zorahrel/react-stickyt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Stickyt

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

Installation

yarn add react-stickyt

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.

About

Stick your React content to the window!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages