pulkitxm

Line Draw SVG

Component 8

About

An SVG path that animates drawing itself on scroll, hover, or mount, with built-in diamond, circle, star, heart, and arrow presets.

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

Code

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

Usage.tsx

import { LineDrawSvg } from "@/components/ui/line-draw-svg";

export default function LineDrawSvgDemo() {
  return (
    <div className="flex w-full items-center justify-center bg-background p-10">
      <div className="grid grid-cols-3 items-center gap-8 sm:gap-14">
        {(["diamond", "star", "heart"] as const).map((preset) => (
          <div key={preset} className="flex flex-col items-center gap-4">
            <LineDrawSvg
              preset={preset}
              trigger="mount"
              width={150}
              height={150}
              duration={1.4}
            />
            <span className="text-sm capitalize text-muted-foreground">
              {preset}
            </span>
          </div>
        ))}
      </div>
    </div>
  );
}

Dependencies

More by pulkitxm

View all
  • Handwriting SVG

    Handwriting SVG

    429
  • Aurora Background

    Aurora Background

    151
  • Party Popper

    Party Popper

    50
  • Scroll-Linked Video Scrubber

    Scroll-Linked Video Scrubber

    34
  • Horizontal Scroll Gallery

    Horizontal Scroll Gallery

    32
  • Fluid Cursor Trail

    Fluid Cursor Trail

    32
  • Cursor Spotlight

    Cursor Spotlight

    29
  • Not Found Page

    Not Found Page

    15