Skip to content

hmu332233/react-cursor-spotlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published