@carbon/icons-vue

中文文档
10.141.0发布于 2026/11/04Apache-2.0ESM + CJS构建来源已验证近 30 天下载 7.1万

Vue components for icons in digital and software products using the Carbon Design System

原始使用文档
文档目录6 节
  1. Getting started
  2. Usage
  3. 📚 Examples
  4. 🙌 Contributing
  5. 📝 License
  6. IBM Telemetry

@carbon/icons-vue

Vue components for icons in digital and software products using the Carbon Design System

Getting started

To install @carbon/icons-vue in your project, you will need to run the following command using npm:

npm install -S @carbon/icons-vue

If you prefer Yarn, use the following command instead:

yarn add @carbon/icons-vue

Usage

Icons in this package support the following sizes: 16, 20, 24, and 32 pixels. These sizes refer to the width and height of the icon.

You can install these components from @carbon/icons-vue through two ways. The first is to install them when you're initializing your Vue app. For example:

import { CarbonIconsVue } from '@carbon/icons-vue';
import Bee32 from '@carbon/icons-vue/es/bee/32';
import Vue from 'vue';
import App from './App.vue';

Vue.use(CarbonIconsVue, {
  components: {
    Bee32,
  },
});

new Vue({
  render: (h) => h(App),
}).$mount('#app');

Note: if you would like to find the import path for an icon, you can reference our icon preview

Using CarbonIconsVue we can pass in any of the icon components that we'd like to use. In our application, we can then use them by doing:

<template>
  <Bee32 />
</template>

If you would rather not register icons globally, you can also import them into individual components.

import Bee32 from '@carbon/icons-vue/es/bee/32';

export default {
  name: 'MyComponent',
  component: {
    Bee32,
  },
};

You can pass in props to any icon component for things like accessibility labels, custom classes, event handlers, and more. For example:

<template>
  <Bee32 aria-label="Bee" class="custom-class" v-on:click="handler" />
</template>

📚 Examples

If you're looking for more examples on how to use @carbon/icons-vue, we have some examples that you can check out:

🙌 Contributing

We're always looking for contributors to help us fix bugs, build new features, or help us improve the project documentation. If you're interested, definitely check out our Contributing Guide! 👀

📝 License

Licensed under the Apache 2.0 License.

IBM Telemetry IBM Telemetry

This package uses IBM Telemetry to collect de-identified and anonymized metrics data. By installing this package as a dependency you are agreeing to telemetry collection. To opt out, see Opting out of IBM Telemetry data collection. For more information on the data being collected, please see the IBM Telemetry documentation.

版本与发布记录

@carbon/icons-vue 共发布 397 个版本,首次发布于 2018/12/05;过去 12 个月发布了 48 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
10.141.0latest2026/11/044 天前
10.141.0-rc.02026/11/035 天前
11.0.0-alpha.3v12-alpha2026/10/2812 天前
11.0.0-alpha.22026/10/2218 天前
10.140.02026/10/2119 天前
10.140.0-rc.02026/10/2020 天前

其他发布通道:alpha → 0.0.1-alpha.32,beta → 0.0.1-beta.5,canary → 10.7.0-alpha.5708,nightly → 10.23.0-alpha.0,v10-next → 10.48.6,v12-alpha → 11.0.0-alpha.3。

关于 @carbon/icons-vue 的常见问题

@carbon/icons-vue 是什么?

Vue components for icons in digital and software products using the Carbon Design System

如何安装 @carbon/icons-vue?

在项目目录运行 npm install @carbon/icons-vue,或使用 pnpm add / yarn add / bun add。

@carbon/icons-vue 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/carbon__icons-vue 是否存在。

@carbon/icons-vue 支持 ESM 还是 CommonJS?

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

@carbon/icons-vue 可以商用吗?

@carbon/icons-vue 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@carbon/icons-vue 的下载量有多少?

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

@carbon/icons-vue 还在维护吗?

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