Simple react custom cursor based on plain javascript package Kursor
npm install --save react-kursor
import React from 'react'
import Kursor from 'react-kursor'
function App(){
return (
<Kursor color="#ffffff">
// Content goes here...
</Kursor>
)
}
import React from 'react'
import { useKursor } from 'react-kursor'
function Button(){
const { hoverIn, hoverOut } = useKursor();
return (
<div className="button" onMouseEnter={ hoverIn } onMouseLeave={ hoverOut }>
Button
</div>
)
}
- removeDefaultCursor = true <boolean>
- color = "#000000" <string (either hexcode or rgb)>
- kursorId: key = "" <any>
- local = false <boolean>
- shouldRender = true <boolean>
- type = 1 <int>
MIT © kostberg