@animateicons/react

中文文档
0.13.0发布于 2026/10/25MITTypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 6.9万

Animated SVG icons for React with hover and imperative animation triggers. Built on motion/react.

原始使用文档
文档目录7 节
  1. Documentation
  2. Installation
  3. Usage
  4. Hover, click or both
  5. Props
  6. Other frameworks
  7. License

@animateicons/react

1500 animated SVG icons for React. Built on motion/react.

npm bundle types license

Documentation

For full documentation, visit animateicons.in/icons/docs.

Browse all icons at animateicons.in.

Installation

npm i @animateicons/react
pnpm add @animateicons/react
yarn add @animateicons/react
bun add @animateicons/react

Usage

Import any icon from the lucide or huge subpath:

import { BellRingIcon } from "@animateicons/react/lucide";
import { HeartIcon } from "@animateicons/react/huge";

export default function Demo() {
    return <BellRingIcon size={24} color="#f45b48" />;
}

The icon animates on hover by default.

Hover, click or both

Every icon has startAnimation() and stopAnimation(). useIconHover calls them for you when a user hovers or clicks:

"use client";
import { useIconHover } from "@animateicons/react";
import { BellRingIcon } from "@animateicons/react/lucide";

export default function Bell() {
    const { ref, triggerProps } = useIconHover(); // hover (default)

    return (
        <button {...triggerProps}>
            <BellRingIcon ref={ref} size={28} />
        </button>
    );
}

See the full docs for click, both and multiple icons.

Props

PropTypeDefault
sizenumber24
colorstringcurrentColor
durationnumber1
isAnimatedbooleantrue
classNamestring-

Other frameworks

Not using React? The same icons and the same motion ship as @animateicons/vanilla for plain JS and web components, @animateicons/vue for Vue 3 and Nuxt, and @animateicons/angular for Angular. Docs: Plain JS, Vue and Angular.

License

MIT © Avijit Dey

Icon shapes are based on Lucide and Hugeicons, see the third-party notices.

版本与发布记录

@animateicons/react 共发布 26 个版本,首次发布于 2026/05/01;过去 12 个月发布了 26 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.13.0latest2026/10/2514 天前
0.12.12026/10/1721 天前
0.12.02026/10/061 个月前
0.11.02026/10/031 个月前
0.10.02026/10/021 个月前
0.9.02026/10/011 个月前

关于 @animateicons/react 的常见问题

@animateicons/react 是什么?

Animated SVG icons for React with hover and imperative animation triggers. Built on motion/react.

如何安装 @animateicons/react?

在项目目录运行 npm install @animateicons/react,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.0.0 || ^19.0.0)、react-dom(^18.0.0 || ^19.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@animateicons/react 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@animateicons/react 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@animateicons/react 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.17.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@animateicons/react 可以商用吗?

@animateicons/react 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@animateicons/react 的下载量有多少?

根据 npm 官方下载统计,@animateicons/react 在 2026/10/06 – 2026/11/04 这 30 天内被下载 69,346 次,日均约 2,312 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@animateicons/react 还在维护吗?

最新版本 0.13.0 发布于 2026/10/25(14 天前);至今共发布 26 个版本,其中过去 12 个月发布了 26 个;首次发布于 2026/05/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。