Skip to content
React Mouse Follow to make a react element follow the mouse.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.storybook
flow
src
stories
test
tools
.editorconfig
.eslintrc.js
.flowconfig
.gitattributes
.gitignore
.nycrc
.travis.yml
CHANGELOG.md
LICENSE
README.md
example.gif
package.json
yarn.lock

README.md

react-mouse-follow

NPM version NPM downloads Build Status codecov Dependency Status

Quick description of what it does!

Installation

npm install react-mouse-follow

Usage

import 'react-mouse-follow/styles.css';
import ReactStickyHeader from 'react-mouse-follow';
import ReactDOM from 'react-dom';

ReactDOM.render(
  <ReactStickyHeader
    // This will be the sticky strip.
    header={
      <div className={cx('Header_root', { sticky })}>
        <h1 className="Header_title">ReactStickyHeader</h1>

        <ul className="Header_links">
          <li className="Header_link">When</li>
          <li className="Header_link">Why</li>
          <li className="Header_link">About</li>
        </ul>
      </div>
    }
  >
    <section>
      // More header stuff here, this won't be sticky.
    </section>
  </ReactStickyHeader>,
  document.getElementById('container')
);
prop type required
children Children no
header Children yes
backgroundImage string no
backgroundColor string no
headerOnly boolean no
onSticky (boolean) => void no
className string no

React Story Book

To run the component in various modes, run the following command then go to http://localhost:6006/.

npm start

Testing

npm test
You can’t perform that action at this time.