@equinor/eds-icons

中文文档
1.6.0发布于 2026/09/08Apache-2.0TypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 10.9万

Icons from the Equinor Design System

原始使用文档
文档目录7 节
  1. Installation
  2. Usage
  3. React
  4. Other web frameworks
  5. Example of icon data
  6. FAQ
  7. Credits

@equinor/eds-icons

This package is a collection of the system icons from the Equinor Design System as javascript objects.

Installation

npm install @equinor/eds-icons

If you use Typescript, make sure you have typescript >= 3.8 as a devDependency:

npm install typescript --save-dev

Usage

Import svg data:

import { save } from "@equinor/eds-icons"

React

We have developed a react component to simplify use of the EDS icons library within react.

import { Icon } from '@equinor/eds-core-react'
import { save } from '@equinor/eds-icons'

// Use library approach 
Icon.add({ save }) // (this needs only be done once)
<Icon name="save" />

// OR 

// Use directly via data prop:
<Icon data={save} />

Other web frameworks

You can render the EDS icons using plain svg.

⚠️ Due to how Figma parses and exports svg icons the following attributes must be added to your <path> element; fill-rule="evenodd" clip-rule="evenodd".

These are not included to reduce bundle size as they are needed for every icon.

import { save } from '@equinor/eds-icons'

<svg viewBox={`0 0 ${save.width} ${save.height}`}>
  <path d={save.svgPathData} fill-rule="evenodd" clip-rule="evenodd">
</svg>

Icon names

Use EDS Assets in Figma(Equinor Figma account needed🔒) or our icon preview in Storybook for icon names. Spaces in icon names are replaced with underscores.

star-filled -> star_filled.

Example of icon data

{
  name: 'star_filled',
  prefix: 'eds',
  height: '24',
  width: '24',
  svgPathData: 'M12 16.067l4.947 3.6-1.894-5.814L20 10.334h-6.067l-1.933-6-1.933 6H4l4.947 3.52-1.894 5.814 4.947-3.6z',
}

FAQ

  • If you are using NodeJS 13+ for module loading, it now has native ES modules support. Add "type":"module" to your apps package.json to enable this.

  • If you get a syntax error trying to import ES module, try importing the CJS module as not all loaders have support for ES modules yet

Credits

The EDS system icons are built on a copy of the Outlined Material Design icons provided open-source by Google. The icons have been customised and renamed for Equinor’s use.

版本与发布记录

@equinor/eds-icons 共发布 52 个版本,首次发布于 2019/11/08;过去 12 个月发布了 9 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.6.0latest2026/09/082 个月前
1.5.12026/06/254 个月前
1.5.02026/05/205 个月前
1.4.02026/04/146 个月前
1.3.02026/02/208 个月前
1.2.22026/02/119 个月前

其他发布通道:next → 0.19.2-dev-03072023-3。

关于 @equinor/eds-icons 的常见问题

@equinor/eds-icons 是什么?

Icons from the Equinor Design System

如何安装 @equinor/eds-icons?

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

@equinor/eds-icons 支持 TypeScript 吗?

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

@equinor/eds-icons 支持 ESM 还是 CommonJS?

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

@equinor/eds-icons 可以商用吗?

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

@equinor/eds-icons 的下载量有多少?

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

@equinor/eds-icons 还在维护吗?

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