React Cursor Pointer library is an re-usable customisable react pointer.
Install React Cursor Pointer from npmjs
npm install react-cursor-pointer@latest
Use the Pointer component from react-cursor-pointer
import React from "react";
import Pointer from "react-cursor-pointer";
const App = () => {
return (
<div>
<Pointer size={55} color="black" />
{/* if you want an image as the cursor background add image prop with the image's path as value*/}
{/* image="src/assets/pikachu.png" */}
</div>
);
};
export default App;
- Size Must be valid number data type.
- Color prop must be an valid css color string.
- It is the backround color of your cursor.
- Image props must an absolute path to the image that you want to be the background color of the cursor.
- It can also be an image url.
- It is an optional prop. If you don't specify it circular cursor background with the color specified in the color prop will be used.
Copyright (c) 2023 React Cursor Pointer. MIT Licensed.