# @coreui/icons-react 中文文档

规范地址：https://npmcn.com/package/%40coreui/icons-react/

版本：2\.3\.0
npm 元数据更新时间：2025-12-11T13:15:44.614Z
中文译文更新时间：2026-11-10T19:19:46.606Z
软件包许可：MIT

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

原始 npm 页面：https://www.npmjs.com/package/%40coreui/icons-react
原文对照：https://npmcn.com/package/%40coreui/icons-react/?lang=original
项目主页：https://coreui.io/react/docs/components/icon/
源码仓库：https://github.com/coreui/coreui-icons-react

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

- 包体积（解压后）：344 kB，19 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：0 个
- peer 依赖：react \>=17，react-dom \>=17
- 首次发布：2020-02-18T15:58:36.170Z
- 最新版本发布：2024-07-14T16:00:32.385Z
- 近 30 天下载量：384671（2026-10-11 至 2026-11-09，npm 官方下载统计）
- 已发布版本数：27（近 12 个月 0 个）

## 中文简介

CoreUI 图标的官方反应组件

## 安装

```sh
npm install @coreui/icons-react
```

也可以使用：`pnpm add @coreui/icons-react`、`yarn add @coreui/icons-react`、`bun add @coreui/icons-react`

## README

[![CoreUI Icons logo](https://coreui.io/images/brand/coreui-icons.svg)](https://coreui.io/)

CoreUI图标和CoreUI图标PRO的官方 react.js组件.  
[**探索反应文件的 CoreUI 图标**](https://coreui.io/react/docs/components/icon/)  
  
[报告错误](https://github.com/coreui/coreui-icons/issues/new?template=bug_report.md) • 妇女 [请求特性](https://github.com/coreui/coreui-icons/issues/new?template=feature_request.md) • 妇女 [博客](https://blog.coreui.io/)

## 状态

[![npm package](https://img.shields.io/npm/v/@coreui/icons-react/latest?style=flat-square)](https://www.npmjs.com/package/@coreui/icons-react) [![NPM downloads](https://img.shields.io/npm/dm/@coreui/icons-react.svg?style=flat-square)](https://www.npmjs.com/package/@coreui/icons-react) ![react](https://img.shields.io/badge/react-%5E17.0.2-lightgrey.svg?style=flat-square&logo=react)

## 安装

```bash
npm install @coreui/icons
npm install @coreui/icons-react
```

或者说

```bash
yarn add @coreui/icons
yarn add @coreui/icons-react
```

## 使用

### 单个图标

```jsx
import { CIcon } from '@coreui/icons-react';
import { cifAU } from '@coreui/icons';

...
render() {
  return (
    <CIcon icon={cilList} size="xxl"/>
  )
}
...
```

### 所有图标

```jsx
import { CIcon } from '@coreui/icons-react';
import * as icon from '@coreui/icons';

...
render() {
  return (
    <CIcon icon={icon.cilList} size="xxl"/>
  )
}
...
```

## API 密码

| 属性 | 类型 | 说明 |
| --- | --- | --- |
| 类Name | `string` | 用于组件的所有类的字符串Name. |
| 自定义分类Name | `string` | `object` | `string[]` | 用于替换默认 CIcon 组件类 。 道具凌驾于"大小"道具之上. |
| 图标 | `string` | `string[]` | 放置在 React 对象或 SVG 内容中的图标名称 . |
| 高度 | `number` | 高度属性定义了图标的垂直长度. |
| 大小 | `sm` | `md` |`lg` | `xl` | `xxl` | `3xl` | `4xl` | `5xl` | `6xl` | `7xl` | `8xl` | `9xl` | 图标大小 . |
| 使用情况 | `string` | 如果定义的组件将使用 `use` 标签. |
| 标题 | `string` | 标题标签内容 . |
| 宽度 | `number` | 宽度属性定义了图标的横向长度. |

## 常见问题

### @coreui/icons-react 是什么？

CoreUI 图标的官方反应组件

### 如何安装 @coreui/icons-react？

在项目目录运行 npm install @coreui/icons-react，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：react（\>=17）、react-dom（\>=17）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。

### @coreui/icons-react 支持 TypeScript 吗？

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

### @coreui/icons-react 支持 ESM 还是 CommonJS？

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

### @coreui/icons-react 可以商用吗？

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

### @coreui/icons-react 的下载量有多少？

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

### @coreui/icons-react 还在维护吗？

最新版本 2\.3\.0 发布于 2024/07/15（2 年前）；至今共发布 27 个版本，其中过去 12 个月发布了 0 个；首次发布于 2020/02/18。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

