One motion core for every animated icon.
Install
terminal
npx shadcn@latest add https://animate.prequelui.terravidhal.me/r/icon-core.jsonThe core exposes one component. Every icon file is a set of SVG variants, so adding an icon never adds another animation implementation.
Triggers
triggers.tsx
import { AnimatedIcon } from "@/components/prequelui/icons/core";
import { BellIcon, SearchIcon, LoaderIcon } from "@/components/prequelui/icons/lucide-set";
<AnimatedIcon animateOnHover speed={1} delay={0}>
<BellIcon size={24} />
</AnimatedIcon>
<AnimatedIcon animateOnTap>
<SearchIcon size={24} />
</AnimatedIcon>
<AnimatedIcon animateOnView loop>
<LoaderIcon size={24} />
</AnimatedIcon>- •
animateOnHoverignores touch pointers. - •
animateOnTapstarts on pointer down and stops on release. - •
animateOnViewplays once by default. - • A new interaction cancels a pending
delay.
Timing
Path drawing runs for 0.8 s on an ease-in-out; path loops run for 1.6 s. Named variants usually take between 0.4 s and 0.8 s. The speed multiplier scales durations and springs together.