Name: react-stickydiv
Owner: Zapier
Description: React Component which keeps any HTML element sticky whenever it is scrolled beyond view
Created: 2015-04-24 19:33:31.0
Updated: 2016-01-28 05:11:13.0
Pushed: 2016-01-28 18:28:41.0
Size: 58
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
React Component that sets a div (or any HTML element) sticky when it's scrolled beyond view.
Demo at http://learnreact.robbestad.com/#/stickydiv
% npm install react-stickydiv --save
The compiled version of the script is automatically created by running:
make jsx
There's no need to update this manually.
var StickyDiv = require('react-stickydiv');
MyComponent = React.createClass({
render: function() {
return (
<StickyDiv>
I'm Sticky
</StickyDiv>
);
}
});
var MyComponent = React.createClass({
render: function() {
return React.createElement(StickyDiv, null, React.createElement("div", null, "I'm Sticky"));
}
});