0.2.0 • Published 4 years ago

react-stickie v0.2.0

Weekly downloads
18
License
Apache-2.0
Repository
github
Last release
4 years ago

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/

0.2.0

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago