# @exawizards/exabase-design-system-icons-react 中文文档

规范地址：https://npmcn.com/package/%40exawizards/exabase-design-system-icons-react/

版本：2\.0\.0
npm 元数据更新时间：2026-06-18T09:54:23.075Z
中文译文更新时间：2026-11-14T03:08:49.788Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40exawizards/exabase-design-system-icons-react
原文对照：https://npmcn.com/package/%40exawizards/exabase-design-system-icons-react/?lang=original

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：1.9 MB，1789 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：0 个
- peer 依赖：react \>=16\.8\.0
- 首次发布：2024-04-01T04:23:02.501Z
- 最新版本发布：2026-06-18T09:54:22.918Z
- 近 30 天下载量：18436（2026-10-14 至 2026-11-12，npm 官方下载统计）
- 已发布版本数：5（近 12 个月 1 个）

## 中文简介

ExaBase 设计系统的响应图标库

## 安装

```sh
npm install @exawizards/exabase-design-system-icons-react
```

也可以使用：`pnpm add @exawizards/exabase-design-system-icons-react`、`yarn add @exawizards/exabase-design-system-icons-react`、`bun add @exawizards/exabase-design-system-icons-react`

## README

# exaBase 设计系统图标反应

[exaBase 设计系统图标](https://exawizards.com/exabase/icons) (v1.4.0)用于反应.

## 安装

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

## 使用量

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

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

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

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

如果您使用 Next.js,请将软件包添加到 [`optimizePackageImports`](https://nextjs.org/docs/app/api-reference/config/next-config-js/optimizePackageImports) 将命名的导入重写为直接导入 :

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

### 大小

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

```html
<CheckmarkCircleIcon size="20" />
```

### 颜色

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

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

### 无障碍

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

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

### `aria-label`

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

```html
<CheckmarkCircleIcon aria-label="Success" />
```

输出 :

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

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

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

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

输出 :

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

## 道具

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

## 许可证

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

## 版权

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

## 常见问题

### @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 和提交记录判断。

