
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
react-mouse-trails
Advanced tools
A lightweight WebGL-based React component for creating a mouse trail effect.
A lightweight WebGL-based React component for creating an interactive mouse trail effect. Works with Next.js out of the box.
✅ Fully TypeScript
✅ Leverages the power of React 18 Server components
✅ Compatible with all React build systems/tools/frameworks
✅ Documented with Typedoc (Docs)
✅ Examples for Next.js, Vite
Please consider starring this repository and sharing it with your friends.
$ pnpm add react-mouse-trails
or
$ npm install react-mouse-trails
or
$ yarn add react-mouse-trails
You can import CSS in your global styles or from your component. In the case of Next.js, you can import global styles only in layout
or _app
components.
In your stylesheet
@import "react-mouse-trails/dist";
or in your component
import "react-mouse-trail/dist/index.css";
Here's a revised version of the usage section:
MouseTrail is simple to integrate:
import { MouseTrail } from "react-mouse-trail";
export default function Layout() {
return (
<html lang="en" suppressHydrationWarning>
<body className={inter.className}>
{/* ... */}
<MouseTrail rgb={[1, 0, 0]} />
</body>
</html>
);
}
By default, the RGB value [1, 0, 0]
represents the color red.
This library is licensed under the MPL-2.0 open-source license.
Please consider enrolling in our courses or sponsoring our work.
with 💖 by Mayank Kumar Chaudhari
FAQs
A lightweight WebGL-based React component for creating a mouse trail effect.
The npm package react-mouse-trails receives a total of 1,455 weekly downloads. As such, react-mouse-trails popularity was classified as popular.
We found that react-mouse-trails demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.