@exawizards/exabase-design-system-icons-react

中文文档
2.0.0发布于 2026/06/18MITTypeScriptESM + CJS零依赖近 30 天下载 1.8万

ExaBase 设计系统的响应图标库

中文使用文档
文档目录10 节
  1. 安装
  2. 使用量
  3. 大小
  4. 颜色
  5. 无障碍
  6. aria-label
  7. title 财务报告和审定财务报表 titleId
  8. 道具
  9. 许可证
  10. 版权

exaBase 设计系统图标反应

exaBase 设计系统图标 (v1.4.0)用于反应.

安装

npm i @exawizards/exabase-design-system-icons-react

使用量

import { CheckmarkCircleIcon } from "@exawizards/exabase-design-system-icons-react";

function MyComponent() {
  return <CheckmarkCircleIcon />;
}

每个图标也作为单个模块发布,因此可以直接导入. 这样做有助于避免在没有树摇动的环境中装入整个图标(例如 Dev 服务器):

import CheckmarkCircleIcon from "@exawizards/exabase-design-system-icons-react/CheckmarkCircleIcon";

如果您使用 Next.js,请将软件包添加到 optimizePackageImports 将命名的导入重写为直接导入 :

// next.config.js
module.exports = {
  experimental: {
    optimizePackageImports: ["@exawizards/exabase-design-system-icons-react"],
  },
};

大小

默认图标大小为 16您可以通过 size 道具 :

<CheckmarkCircleIcon size="20" />

颜色

出租的SVG已经 fill="currentColor" 属性,因此应用了它们的文本颜色。 你可以通过颜色 color CSS 财产 :

<CheckmarkCircleIcon style="{ color: red }" />

无障碍

输出 SVG 有 role="img" 财务报告和审定财务报表 aria-hidden="true" 默认属性。 这导致屏幕阅读器忽略 SVG 元素 :

<svg role="img" aria-hidden="true" ...>...</svg>

aria-label

如果图标具有语义意义,则需要手动添加 aria-label 属性。 这不会添加 aria-hidden="true" 属性.

<CheckmarkCircleIcon aria-label="Success" />

输出 :

<svg role="img" aria-label="Success" ...>
  <path ... />
</svg>

title 财务报告和审定财务报表 titleId

另一个选项是使用标题和标题Id:

<CheckmarkCircleIcon title="Success" titleId="success-title" />

输出 :

<svg role="img" aria-labelledby="success-title" ...>
  <title id="success-title">Success</title>
  <path ... />
</svg>

道具

Prop类型默认说明
sizenumber16设置图标高度和大小 .
titlestringundefined在 svg 中插入标题元素,并删除 aria-hidden="true" 从svg.
titleIdstringundefined添加一个 id 属性到标题元素,并添加 aria-labelledby={titleId} 属性.

许可证

exaBase设计系统图标根据麻省理工学院许可证获得许可.

- ExaWizards Inc. (原始内容存档于2013-10-12).

版本与发布记录

@exawizards/exabase-design-system-icons-react 共发布 5 个版本,首次发布于 2024/04/01;过去 12 个月发布了 1 个版本。

版本发布日期距今
2.0.0latest2026/06/184 个月前
1.0.12025/04/231.6 年前
1.0.02025/03/261.6 年前
0.4.02024/04/012 年前
0.3.02024/04/012 年前

关于 @exawizards/exabase-design-system-icons-react 的常见问题

@exawizards/exabase-design-system-icons-react 是什么?

ExaBase 设计系统的响应图标库

如何安装 @exawizards/exabase-design-system-icons-react?

在项目目录运行 npm install @exawizards/exabase-design-system-icons-react,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=16.8.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@exawizards/exabase-design-system-icons-react 支持 TypeScript 吗?

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

@exawizards/exabase-design-system-icons-react 支持 ESM 还是 CommonJS?

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

@exawizards/exabase-design-system-icons-react 可以商用吗?

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

@exawizards/exabase-design-system-icons-react 的下载量有多少?

根据 npm 官方下载统计,@exawizards/exabase-design-system-icons-react 在 2026/10/14 – 2026/11/12 这 30 天内被下载 18,436 次,日均约 615 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@exawizards/exabase-design-system-icons-react 还在维护吗?

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