A Sticky Stack component for React.js
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo Added new colorful demo Dec 18, 2015
dist remove unused items property Dec 19, 2015
src remove unused items property Dec 19, 2015
.babelrc first commit Dec 18, 2015
.eslintrc remove double linting rule Dec 19, 2015
.gitignore ignore bundle.js Dec 18, 2015
.travis.yml Travis - use container-based architecture Dec 18, 2015
LICENSE add license Dec 18, 2015
Procfile add heroku deploy Dec 18, 2015
README.md add installation and test instructions Dec 19, 2015
package.json version 0.0.1 Dec 18, 2015
webpack.config.js better demo Dec 18, 2015

README.md

Build Status

React Sticky Stack

A Sticky Stack component for React.js

Installation

$ npm install react-sticky-stack --save

Demo

https://react-sticky-stack.herokuapp.com/

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import {StickyStackContext, StickyStackItem} from 'react-sticky-stack';

const App = React.createClass({
  render() {
    return (
      <StickyStackContext>
        <p>
          Lorem Ipsum
        </p>
        <StickyStackItem position={0}>
          <h1>
            Live
          </h1>
        </StickyStackItem>
        <p>
          Lorem Ipsum
        </p>
        <StickyStackItem position={1}>
          <h2>
            Your
          </h2>
        </StickyStackItem>
        <p>
          Lorem Ipsum
        </p>
        <StickyStackItem position={2}>
          <h3>
            City
          </h3>
        </StickyStackItem>
        <p>
          Lorem Ipsum
        </p>
      </StickyStackContext>
    );
  },
});

ReactDOM.render(<App />, document.getElementById('app'));

Test

$ npm test