3.4.20 • Published 8 years ago

react-stickydiv v3.4.20

Weekly downloads
553
License
ISC
Repository
github
Last release
8 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

8 years ago

3.4.19

9 years ago

3.4.18

9 years ago

3.4.17

10 years ago

3.4.16

10 years ago

3.4.15

10 years ago

3.4.13

10 years ago

3.4.11

10 years ago

3.4.10

10 years ago

3.4.9

10 years ago

3.4.8

10 years ago

3.4.7

10 years ago

3.4.6

10 years ago

3.4.5

10 years ago

3.4.4

10 years ago

3.4.3

10 years ago

3.4.2

10 years ago

3.4.1

10 years ago

3.3.2

10 years ago

3.3.1

10 years ago

3.3.0

10 years ago

3.2.0

10 years ago

3.1.3

11 years ago

3.1.1

11 years ago

3.1.0

11 years ago

3.0.0

11 years ago

2.0.1

11 years ago

1.0.6

11 years ago

1.0.5

11 years ago

1.0.3

11 years ago