npm.io
2.0.0 • Published 6 years ago

react-cursor-follow

Licence
MIT
Version
2.0.0
Deps
0
Size
7 kB
Vulns
0
Weekly
0
Stars
3

react-cursor-follow

Size NPM Version MIT License

npm i react-cursor-follow

A modern cursor follower react component.

Quick Start

Check out the example on CodeSandbox

import * as React from 'react'
import Cursor from 'react-cursor-follower'

const Component = (props) => {
  return <Cursor 
	pulse
	color="#E1AD01"
	duration={1}
	size={45}
	hollow
  />
}

Props

UseMouseOptions
Property Type Default Description
size number 23 The size of the follower in px.
color string black Any CSS color format works. Used for either background or border-color.
pulse boolean false Activate infinite pulse animation.
hollow boolean false Follow circle becomes hollow and has border with 1px and same color as color.
opacity number 1 Range [0, 1]
easing string cubic-bezier(0.18, 0.89, 0.32, 1.28) CSS Easing function for follower transition.
duration number 0.4 Transition duration in seconds.
custom boolean false Set to true if you want to use your own CSS class.

LICENSE

MIT