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.
- Host: GitHub
- URL: https://github.com/itsdouges/react-mouse-follow
- Owner: itsdouges
- License: mit
- Created: 2017-04-10T12:10:42.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-07T13:09:58.000Z (over 8 years ago)
- Last Synced: 2025-01-23T14:38:31.703Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 63.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# [react-mouse-follow](https://github.com/madou/react-mouse-follow)
[](https://www.npmjs.com/package/react-mouse-follow)
[](https://www.npmjs.com/package/react-mouse-follow)
[](https://travis-ci.org/madou/react-mouse-follow)
[](https://codecov.io/gh/madou/react-mouse-follow)
[](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
```