🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

rocket-cursor-component

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rocket-cursor-component

A customizable React component that replaces the cursor with an animated rocket, featuring rotation and flame effects.

1.1.0
latest
Version published
Weekly downloads
6
-25%
Maintainers
1
Weekly downloads
 
Created

Rocket Cursor Component

A customizable React component that replaces the mouse cursor with an animated rocket that rotates based on movement and displays a flame effect when in motion.

Installation

Install the package via npm:

npm install rocket-cursor-component

Usage

Here's an example of how to use the RocketCursor component in your React app:

import React from "react";
import RocketCursor from "rocket-cursor-component"; 

function App() {
  return (
    <div>
      <h1>Your app content here</h1>
      <RocketCursor size={60} threshold={15} flameHideTimeout={300} />
    </div>
  );
}

export default App;

Props

PropTypeDefaultDescription
sizenumber50The size of the rocket cursor in pixels.
thresholdnumber10Minimum distance (pixels) to move before the rocket rotates.
isVisiblebooleantrueInitial visibility state of the rocket cursor.
flameHideTimeoutnumber300Time in milliseconds before the flame hides after stopping.

Features

  • Custom Cursor: Replaces the default mouse cursor with a rocket that follows the cursor.
  • Rotation: The rocket rotates in the direction of the cursor movement.
  • Flame Effect: The rocket displays a flame animation when the cursor is moving.
  • Customizable: Easily adjust the size, rotation threshold, visibility, and flame disappearance time.
  • Element-Specific Visibility: Automatically hides the rocket cursor over elements with the class no-rocket-cursor.

Demo

Here's a demo of the Rocket Cursor in action:

Rocket Cursor Demo

Changelog

1.1.0 (Planned/Current)

  • Refactored SVG into separate components.
  • Added flameHideTimeout prop for configurable flame duration.
  • Improved code structure and efficiency.

1.0.9

  • Added support to hide the Rocket Cursor on elements with the class no-rocket-cursor.

1.0.2

  • Added demo GIF in the README file.

1.0.1

  • Initial release of the Rocket Cursor component.

Author

No898

License

This project is licensed under the MIT License. See the LICENSE file for details.

FAQs

Package last updated on 05 May 2025

Did you know?

Socket

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.

Install

Related posts