react-cursor-spotlight

0.1.0 • Public • Published

react-cursor-spotlight

demo_gif

It is a react component that implements the cursor spotlight effect on mousemove.

Demo

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>

Package Sidebar

Install

npm i react-cursor-spotlight

Weekly Downloads

7

Version

0.1.0

License

MIT

Unpacked Size

3.4 kB

Total Files

3

Last publish

Collaborators

  • hmu332233