
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
cursor-styles
Advanced tools
A very simple npm package for react,offering smooth,many customisable cursors.
A simple npm package for React that offers smooth, customizable cursors.

You can install cursor-styles using npm:
npm install cursor-styles
As cursor-styles expands, you can easily switch between different cursor styles. The current options are:
| Cursor Style | Import Code | Demo Button |
|---|---|---|
| SimpleCursor | import { SimpleCursor } from "cursor-styles"; | View Demo |
| FluidCursor | import { FluidCursor } from "cursor-styles"; | View Demo |
| PieCursor | import { PieCursor } from "cursor-styles"; | View Demo |
| ElasticCursor | import { ElasticCursor } from "cursor-styles"; | View Demo |
| DonutCursor | import { DonutCursor } from "cursor-styles"; | View Demo |
| CustomPngCursor | import { CustomPngCursor } from "cursor-styles"; | View Demo |
To use the cursors from the library, follow these steps:
App.js or index.js), add the following imports:import { SimpleCursor } from "cursor-styles"; // or FluidCursor
import "cursor-styles/dist/style.css";
<SimpleCursor />
// or
<FluidCursor />
You can customize the cursor's appearance using the following attributes:
| Attribute | Description | Default Value |
|---|---|---|
size | Set the size of the cursor | 30 |
color | Change the cursor color | black |
opacity | Adjust the cursor's opacity | 1 |
border | Set the cursor's border using CSS syntax | none |
TransitionTime | Set the cursor's transition time using number values in seconds | 0.2 |
InnerBorderColor | Set the color (its for only pie cursor) | black |
Icon | pass the icon url or location path for CustomPngCursor (only for CustomPngCursor ) | "https://i.ibb.co.com/ts3cf3j/Untitled-design.png" |
hideDefaultCursor | Set true to hide default cursor or false to show default cursor | true |
Here’s an example of how to use the SimpleCursor with a custom styling:
import React from "react";
import { SimpleCursor } from "cursor-styles";
import "cursor-styles/dist/style.css";
const App = () => {
return (
<div>
<SimpleCursor
size={30} ~*control the cursor overall size*~
color="red" ~*control or change the bg-color of the cursor*~
opacity={0.5} ~*control the opacity of the cursor keep value from (0-1)*~
border="1px dotted blue" ~*border styling and adding*~
TransitionTime={0.5} ~*control the transition time of cursor overall animation*~
hideDefaultCursor={false} ~*false means the default cursor will show*~
/>
{/* Your other components */}
</div>
);
};
export default App;
To change the cursor type in the future, simply import the desired cursor component:
import { [NewCursorStyle] } from "cursor-styles";
Then use it in your component:
<NewCursorStyle
size={30}
color="red"
opacity={1}
border="1px solid green"
TransitionTime={0.5}
hideDefaultCursor={false}
/>
For instance, if a new cursor Type called SparkleCursor is added:
import { SparkleCursor } from "cursor-styles";
const App = () => {
return (
<div>
<SparkleCursor
size={30}
color="red"
opacity={1}
border="1px solid green"
TransitionTime={0.5}
hideDefaultCursor={false}
/>
{/* Your other components */}
</div>
);
};
cursor-styles provides an easy way to implement customizable cursors in your React applications. Enjoy smooth, interactive cursors that enhance user experience!
If you want to contribute to this project, fork the repository and clone it to your local machine. Commit your changes and push your changes to your forked repository. Finally, open a pull request with a detailed description of your changes to the dev branch.I highly appreciate any contributions.
If you are facing any problem, feel free to share here.
### [1.0.3] - 2024-11-20
- First Stable Release.
### [Unreleased]
- Features and improvements are being developed.
This version starts with the most recent changes and works backward to the initial release. Let me know if you need further adjustments!
❒ Gmail
❒ WhatsApp
❒ Linkedin
❒ FaceBook
❒ Telegram
This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.
FAQs
A very simple npm package for react,offering smooth,many customisable cursors.
We found that cursor-styles demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.