Beautiful GPU-accelerated fluid trail that follows your mouse on every website
Magic Cursor is a production-ready browser extension that adds a mesmerizing, physics-based fluid simulation trail to your mouse cursor. Built with React, TypeScript, and WebGL, it provides a stunning visual effect without interfering with your browsing experience.
- π¨ GPU-Accelerated Fluid Simulation - Smooth, realistic fluid dynamics using WebGL
- π― Non-Intrusive - Overlay with
pointer-events: none- never blocks clicks or interactions - π Dynamic Colors - Automatically cycling rainbow colors
- π± Touch Support - Works with mouse, trackpad, and touch screens
- β‘ Performance Optimized - Pauses when tab is hidden, handles WebGL context loss
- ποΈ Fully Customizable - Extensive settings for every aspect of the effect
- β Easy Toggle - Enable/disable with one click from the popup
- βοΈ Rich Options Page - Fine-tune pressure, curl, colors, and more
- πΎ Settings Sync - Your preferences sync across devices
- π Cross-Browser - Works on Chrome, Firefox, Opera, Edge, and all Chromium browsers
- Download the latest release from the Releases page
- Unzip the downloaded file
- Open
chrome://extensions(oredge://extensions,opera://extensions) - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the
chromefolder from the unzipped files
- Download the latest
.xpifile from the Releases page - Open
about:addons - Click the gear icon and select "Install Add-on From File"
- Select the downloaded
.xpifile
- Node.js 10+ and npm or yarn
- Git
# Clone the repository
git clone https://github.com/magic-cursor/magic-cursor.git
cd magic-cursor
# Install dependencies
npm install
# or
yarn# Chrome (with hot reload)
npm run dev:chrome
# Firefox (with hot reload)
npm run dev:firefox
# Opera (with hot reload)
npm run dev:operaThen load the extension from extension/<browser>/ directory.
# Build for specific browser
npm run build:chrome
npm run build:firefox
npm run build:opera
# Build for all browsers
npm run buildOutput will be in extension/<browser>/ and packaged as extension/<browser>.zip
- Enable/Disable - Turn the effect on or off
- 3D Shading - Add depth with lighting effects
- Transparent Background - Use transparent or colored background
- Simulation Resolution (64-512) - Physics simulation detail
- Dye Resolution (256-2048) - Color rendering quality
- Pressure (0-1) - Fluid pressure intensity
- Curl (0-50) - Swirling vorticity strength
- Density Dissipation (0-10) - How fast colors fade
- Velocity Dissipation (0-10) - How fast motion slows
- Splat Force (1000-15000) - Mouse movement impact
- Splat Radius (0.05-0.5) - Size of trail effect
- Color Change Speed (1-50) - Rainbow cycling speed
- Pressure Iterations (1-50) - Simulation accuracy vs performance
magic-cursor/
βββ source/
β βββ Background/ # Background service worker
β βββ ContentScript/ # Injected fluid cursor overlay
β β βββ index.tsx # Entry point with settings integration
β β βββ magic-mouse.tsx # WebGL fluid simulation
β βββ Options/ # Settings page
β βββ Popup/ # Extension popup
β βββ utils/ # Shared utilities
β β βββ storage.ts # Settings storage management
β βββ styles/ # Global styles
β βββ manifest.json # Extension manifest
βββ views/ # HTML templates
βββ webpack.config.js # Build configuration
βββ package.json # Dependencies and scripts
- React 17 - UI components
- TypeScript - Type safety
- WebGL 2 - GPU-accelerated rendering
- Webpack 5 - Module bundling
- SCSS - Styling
- webextension-polyfill - Cross-browser API
- Content script injects a fixed-position overlay on every page
- React component initializes WebGL context and fluid simulation
- Mouse/touch events create "splats" in the fluid
- Simulation runs at 60fps with curl, pressure, and advection
- Settings are stored in
browser.storage.syncand applied in real-time
- Automatically pauses when tab is hidden
- Handles WebGL context loss and restoration
- Optimized shader programs
- Configurable quality settings for different devices
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by fluid simulation techniques from PavelDoGreat/WebGL-Fluid-Simulation
- Built with web-extension-starter
- π Report a bug
- π‘ Request a feature
- π Documentation
Made with β€οΈ by the Magic Cursor Team