An open API service indexing awesome lists of open source software.

https://github.com/itsdouges/react-mouse-follow

React Mouse Follow to make a react element follow the mouse.
https://github.com/itsdouges/react-mouse-follow

Last synced: 11 months ago
JSON representation

React Mouse Follow to make a react element follow the mouse.

Awesome Lists containing this project

README

          

# [react-mouse-follow](https://github.com/madou/react-mouse-follow)

[![NPM version](http://img.shields.io/npm/v/react-mouse-follow.svg?style=flat-square)](https://www.npmjs.com/package/react-mouse-follow)
[![NPM downloads](http://img.shields.io/npm/dm/react-mouse-follow.svg?style=flat-square)](https://www.npmjs.com/package/react-mouse-follow)
[![Build Status](http://img.shields.io/travis/madou/react-mouse-follow/master.svg?style=flat-square)](https://travis-ci.org/madou/react-mouse-follow)
[![codecov](https://codecov.io/gh/madou/react-mouse-follow/branch/master/graph/badge.svg)](https://codecov.io/gh/madou/react-mouse-follow)
[![Dependency Status](http://img.shields.io/david/madou/react-mouse-follow.svg?style=flat-square)](https://david-dm.org/madou/react-mouse-follow)

Quick description of what it does!



## Installation

```sh
npm install react-mouse-follow
```

## Usage

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

ReactDOM.render(

ReactStickyHeader


  • When

  • Why

  • About



}
>

// More header stuff here, this won't be sticky.

,
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/`.

```bash
npm start
```

### Testing

```bash
npm test
```