Animated React component — SunMoon / SunMoonIcon
Hover the sun-moon icon above to see the default draw animation.
Tree-shakable named import — only the icons you reference end up in your bundle.
import { SunMoon } from "lucide-motion";Also exported as SunMoonIcon for the Lucide-suffix naming convention.
Drop the component into your JSX. The default trigger plays the draw animation on hover.
import { SunMoon } from "lucide-motion";
<SunMoon 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 2v2"
}
],
[
"path",
{
"d": "M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715"
}
],
[
"path",
{
"d": "M16 12a4 4 0 0 0-4-4"
}
],
[
"path",
{
"d": "m19 5-1.256 1.256"
}
],
[
"path",
{
"d": "M20 12h2"
}
]
]