npm

react-stickie
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

react-stickie

React sticky component.
and IE11 support!
sticky + ie = stickie.

Usage

import { Sticky } from 'react-stickie';
 
// { position: sticky; top: 10px }
return (
  <Sticky top={10}>
    <div>sticky target</div>
  </Sticky>
);

Properties

top

  • type: number | undefined
  • optional (default: undefined)

Like top style of sticky position.
Not string like '1px'.
Specified either of top or bottom.

bottom

  • type : number | undefined
  • optional (default: undefined)

Like bottom style of sticky position.
Not string like '1px'.
Specified either of top or bottom.

onChange

  • type: function
  • optional (default: undefined)

Called at stick state changed.

ignorePositionSticky

  • type: boolean
  • optional (default: false)

Specified false to disable sticky position. It works the same as legacy browser.

example

run command

npm run example

and access to http://localhost:8080/

Readme

Keywords

none

Package Sidebar

Install

npm i react-stickie

Weekly Downloads

0

Version

0.2.0

License

Apache-2.0

Unpacked Size

44.4 kB

Total Files

65

Last publish

Collaborators

  • shate