动效图标

New

一个组件承载七种 hover 动效图标(描边/摆动/旋转/弹跳/弹入/脉动/微移),用单个 variant prop 切换。基于 motion + lucide,尊重减少动态偏好。

Draw
Wiggle
Spin
Pop

安装

用 shadcn CLI 添加,或手动复制源码。

$ bunx --bun shadcn add @uilab/animated-icon

API 参考

variant
"pulse" | "pop" | "draw" | "wiggle" | "spin" | "bounce" | "nudge"

Which hover animation to play.

size?
number

Icon size in px.

28
className?
string
icon?
LucideIcon

Lucide icon component to animate. Ignored by the `draw` variant.

paths?
string[]

SVG path `d` strings the `draw` variant renders. Defaults to a checkmark.

["M5 13l4 4L19 7"]

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.