3.4.20 • Published 7 years ago

react-stickydiv v3.4.20

Weekly downloads
553
License
ISC
Repository
github
Last release
7 years ago

Sticky Div

React Component that sets a div (or any HTML element) sticky when it's scrolled beyond view.

Demo at http://learnreact.robbestad.com/#/stickydiv

Installation

% npm install react-stickydiv --save

A note about index.js

The compiled version of the script is automatically created by running:

make jsx

There's no need to update this manually.

Usage

Options

  • {int} offsetTop - The offset from the top of the page, optional; default: 0
  • {int} zIndex - The zIndex for the sticky element, optional; default: 999
  • {function} onFixedChange - Function called on change on sticky state, optional;
  • {string} className - A className (or names) for the sticky element, optional; default: ''

With JSX

var StickyDiv = require('react-stickydiv');

MyComponent = React.createClass({
  render: function() {
     return (
       <StickyDiv>
       	 I'm Sticky
       </StickyDiv>
    );
  }
});

Without JSX

  var MyComponent = React.createClass({
      render: function() {
          return React.createElement(StickyDiv, null, React.createElement("div", null, "I'm Sticky"));
      }
  });
3.4.20

7 years ago

3.4.19

8 years ago

3.4.18

8 years ago

3.4.17

9 years ago

3.4.16

9 years ago

3.4.15

9 years ago

3.4.13

9 years ago

3.4.11

9 years ago

3.4.10

9 years ago

3.4.9

9 years ago

3.4.8

9 years ago

3.4.7

9 years ago

3.4.6

9 years ago

3.4.5

9 years ago

3.4.4

9 years ago

3.4.3

9 years ago

3.4.2

9 years ago

3.4.1

9 years ago

3.3.2

9 years ago

3.3.1

9 years ago

3.3.0

9 years ago

3.2.0

9 years ago

3.1.3

9 years ago

3.1.1

9 years ago

3.1.0

9 years ago

3.0.0

9 years ago

2.0.1

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.3

10 years ago