react-cursor-spotlight
It is a react component that implements the cursor spotlight effect on mousemove.
Install
$ yarn add react-cursor-spotlight
// or
$ npm install --save react-cursor-spotlight
Usage
basic
import { CursorSpotlight } from 'react-cursor-spotlight';
<CursorSpotlight>
<div>Contents</div>
</CursorSpotlight>
custom spotlight
import { CursorSpotlight } from 'react-cursor-spotlight';
const spotlightStyle = {
width: '50px',
height: '50px',
radius: '0%',
backgroundColor: '#fff',
};
<CursorSpotlight spotlightStyle={spotlightStyle}>
<div>Contents</div>
</CursorSpotlight>