Animated React component — Magnet / MagnetIcon
Hover the magnet icon above to see the default draw animation.
Tree-shakable named import — only the icons you reference end up in your bundle.
import { Magnet } from "lucide-motion";Also exported as MagnetIcon for the Lucide-suffix naming convention.
Drop the component into your JSX. The default trigger plays the draw animation on hover.
import { Magnet } from "lucide-motion";
<Magnet size={32} />duration={0.2} stagger={0}duration={1.5} stagger={0.4}easing="linear"trigger="mount" repeat={Infinity}The icon's underlying SVG node tree — useful if you need to render or transform it yourself instead of using the component.
[
[
"path",
{
"d": "m12 15 4 4"
}
],
[
"path",
{
"d": "M2.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.029-6.029a1 1 0 1 1 3 3l-6.029 6.029a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.365-6.367A1 1 0 0 0 8.716 4.282z"
}
],
[
"path",
{
"d": "m5 8 4 4"
}
]
]