An open API service indexing awesome lists of open source software.

https://github.com/pie6k/react-smart-sticky

SmartSticky is React component for sticky topbar that will hide when scrolling down and show when scrolling up.
https://github.com/pie6k/react-smart-sticky

component react react-component scrolling

Last synced: about 1 month ago
JSON representation

SmartSticky is React component for sticky topbar that will hide when scrolling down and show when scrolling up.

Awesome Lists containing this project

README

        

# React Smart Sticky

![alt tag](https://pie6k.github.io/react-smart-sticky/examples/src/animation.gif)

[Online Demo](https://pie6k.github.io/react-smart-sticky/examples/dist/)

## Features

* Works like topbars in native applications (Facebook, Medium.com, Instagram etc.)
* Works on mobile devices
* Topbar dissappears 'with the flow' of scrolling - if you'll stop scrolling - sticky element will stop it's movement too.

## Usage

```sh
npm install react-smart-sticky --save
```

```js
import SmartSticky from 'react-smart-sticky';

...

Some topbar content or whatever you need

```

## Additional options

```js

Some topbar content or whatever you need

```

`tolerance` is ammount of pixels needed to be scrolled before sticky element will start to show/hide.

## Licence

MIT