@christian-martins/react-cursor-follow
v2.0.0
Published
A react component library for cursor follower.
Downloads
1
Readme
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