Ravi Katiyar

Mouse Following Line

Component 149

About

Mouse-Following Line Field Animation A dynamic grid of lines that react and rotate smoothly toward cursor movement, creating an engaging motion effect. Perfect for interactive backgrounds, modern websites, or eye-catching hero sections.

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

Code

How Mouse Following Line is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { GridAnimation } from "@/components/ui/mouse-following-line";

const settings = {
  strokeLength: 10,
  strokeWidth: 1,
  spacing: 30,
  cols: 40,
  rows: 40,
};

export default function Demo(props: Partial<typeof settings>) {
  const s = { ...settings, ...props };
  return (
    <div className="h-screen w-screen flex items-center justify-center overflow-hidden">
      <GridAnimation {...s} />
    </div>
  );
}

Dependencies

More by Ravi Katiyar

View all
  • Animated Shader Hero

    Animated Shader Hero

    3.7K
  • Hero

    Hero

    3.1K
  • Circular Gallery

    Circular Gallery

    2.7K
  • Minimalist Hero

    Minimalist Hero

    2.5K
  • Floating Icons Hero Section

    Floating Icons Hero Section

    1.9K
  • Glass Calendar

    Glass Calendar

    1.8K
  • Feature Carousel

    Feature Carousel

    1.7K
  • AI Image Generator Hero

    AI Image Generator Hero

    1.4K