1.1.8 • Published 6 years ago

react-stickier v1.1.8

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Stickier - Sticky React Component

Stickier is a React component wrapper, that uses position: sticky in browsers that support this property, and for browsers that do not support it, this awesome polyfill by wilddeer is used.

How to use

npm install react-stickier
import Sticky from 'react-stickier'

<Sticky>Your component</Sticky>

Demo

Props

  • style - CSS styles to be applied to the component. Please note that position will remain sticky, and if you do not pass top/bottom they will remain 0

  • className - CSS class to be applied to the component. Default class is StickyElement

Any other props will be passed to the component (for example this is useful for aria-* props).

Examples

  • Adding classes :
<Sticky className={ 'customClass1 customClass2' }>
  Your component
</Sticky>
  • Adding styles :
<Sticky style={ { backgroundColor: 'red' } }>
  Your component
</Sticky>
1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago