felix-au

Difference Blend Cursor

Component

About

A custom mouse-follower cursor made of two circles that use mix-blend-mode: difference to invert the colors beneath them, expanding on hover over interactive elements and bouncing on click.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Difference Blend Cursor to your project and fits it to your theme.

Code

How Difference Blend Cursor is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import DifferenceBlendCursor from "@/components/ui/difference-blend-cursor";
import { useRef } from "react";

export default function DifferenceBlendCursorDemo() {
  const containerRef = useRef(null);

  return (
    <div
      ref={containerRef}
      className="relative w-full h-screen overflow-hidden flex items-center justify-center bg-black text-white"
      style={{ cursor: "none" }}
    >
      <DifferenceBlendCursor
        containerRef={containerRef}
        config={{
          color: "#f7f8fa",
          bigSize: 25,
          smallSize: 6,
          bigSpeed: 0.1,
          smallSpeed: 0.25,
          pointerScale: 2.5,
          pointerAnim: true,
          clickAnim: true,
          clickScale: 1.0,
        }}
      />

      <div className="text-center space-y-5 px-6">
        <h2 className="text-3xl font-semibold tracking-tight">
          Move your cursor here
        </h2>
        <p className="text-white/60 max-w-md mx-auto">
          Hover elements and watch them invert colors via mix-blend-mode:
          difference.
        </p>
        <button className="btn rounded-full border border-white/30 px-6 py-2 text-sm hover:border-white/60 transition-colors">
          Hover me
        </button>
      </div>
    </div>
  );
}

More by felix-au

View all
  • Matrix Rain Cursor

    Matrix Rain Cursor

    43
  • Constellation Cursor

    Constellation Cursor

    19
  • Wind Stream Cursor

    Wind Stream Cursor

    8
  • Rainbow Comet Cursor

    Rainbow Comet Cursor

    8
  • DNA Helix Cursor

    DNA Helix Cursor

    7
  • Pixel Shatter Cursor

    Pixel Shatter Cursor

    4
  • Fire Trail Cursor

    Fire Trail Cursor

    4
  • Bubble Float Cursor

    Bubble Float Cursor

    3