An SVG path that animates drawing itself on scroll, hover, or mount, with built-in diamond, circle, star, heart, and arrow presets.
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> ); }