react-cursor-pointer
v0.0.3
Published
React cursor pointer library is an re-usable customisable react pointer.
Downloads
8
Readme
React Cursor Pointer
React Cursor Pointer library is an re-usable customisable react pointer.
Installation
Install React Cursor Pointer from npmjs
npm install react-cursor-pointer@latest
Usage
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;
Props
size:
- Size Must be valid number data type.
color:
- Color prop must be an valid css color string.
- It is the backround color of your cursor.
image
- 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.
Author
License
Copyright (c) 2023 React Cursor Pointer. MIT Licensed.