@adobe/spectrum-css-workflow-icons

中文文档
5.0.0发布于 2025/08/26Apache-2.0零依赖近 30 天下载 9.2万
原始使用文档
文档目录7 节
  1. Setup
  2. To build and preview the icons
  3. Updating the icons
  4. CSS Custom Properties
  5. Tasks
  6. Contributing
  7. Licensing

Netlify

GitHub Actions build status on main

Spectrum Workflow Icons

Build and publish spectrum-css workflow svg icons and svg sprite sheet for Spectrum CSS.

Setup

yarn install

To build and preview the icons

Run yarn build will generate the ready to publish package in dist/.

Run yarn serve to see the mini-site for all the workflow icons.

Updating the icons

Icons are available from an internal repository that is available only to Adobe employees. If you are an employee with access, follow the steps below:

  1. npm login --scope a4u to authenticate with the internal repository
  2. yarn add -D @a4u/a4u-s2-icon-global-set-open-source-processed to install the latest version of the internal repository
  3. Do not commit the updated package.json with the new version of @a4u/a4u-s2-icon-global-set-open-source-processed as this blocks non-Adobe employees from installing and using the repository.

Once your environment is ready, you can run yarn build to rebuild the icons/ folder. Expect to see changes to the committed content in the icons/ folder.

To preview your updates, run yarn serve.

CSS Custom Properties

Icons include CSS Custom Properties as fill attributes.

Example:

<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
  <path d="m16.87598,4.84082h-.00098l-5.74902-3.31934c-.69629-.40234-1.55859-.40137-2.25098,0l-5.75098,3.31934c-.69336.40137-1.12402,1.14844-1.12402,1.94922v6.63965c0,.80176.43164,1.54785,1.125,1.94824l5.74902,3.32031c.34766.20117.7373.30078,1.12598.30078.38965,0,.77832-.09961,1.125-.30078l5.75-3.32031c.69336-.40039,1.125-1.14648,1.125-1.94824v-6.63965c0-.80078-.43066-1.54785-1.12402-1.94922Zm-7.25-2.02051c.11523-.06738.24414-.10059.37402-.10059.12891,0,.25879.0332.375.10059l5.28516,3.05151-5.65942,3.12231-5.66431-3.12085,5.28955-3.05298ZM3.875,14.0791c-.23145-.13379-.375-.38281-.375-.64941v-6.30371l5.75,3.16797v6.88892l-5.375-3.10376Zm12.25,0l-5.375,3.10327v-6.8894l5.75-3.17236v6.30908c0,.2666-.14355.51562-.375.64941Z" fill="var(--iconPrimary, #222)"/>
</svg>

Here is the list of properties available:

Property nameFallback valueAdditional context
--iconPrimarycurrentColorMost workflow icons
--iconRedPrimary#d31510Used in: CloudStateErrorRed_22x20.svg
--iconFill#464646Express only
--iconFillMedium#909090Express only

Tasks

The following tasks are available:

CommandDescriptionExamples
cleanCleans all output files in the dist directoryyarn clean
buildDeletes and rebuilds the icon folder, can only be run by an Adobe employee with accessyarn build
siteCleans the dist directory, copies website assets and prepares the dist output for the site previewyarn site
serveBuilds the site and opens a localhost of the preview website to view the workflow iconsyarn serve

Contributing

A very special thank you to all of our contributors without whom this project would not be possible.

Want to join the team? Check out the contributing guidelines to get started.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

版本与发布记录

@adobe/spectrum-css-workflow-icons 共发布 30 个版本,首次发布于 2019/08/23;过去 12 个月发布了 0 个版本。

版本发布日期距今
5.0.0latest2025/08/261.2 年前
4.1.02025/04/111.6 年前
1.7.0legacy2025/02/201.7 年前
1.6.02025/02/081.7 年前
4.0.02024/10/022 年前
3.0.02024/05/302 年前

关于 @adobe/spectrum-css-workflow-icons 的常见问题

如何安装 @adobe/spectrum-css-workflow-icons?

在项目目录运行 npm install @adobe/spectrum-css-workflow-icons,或使用 pnpm add / yarn add / bun add。

@adobe/spectrum-css-workflow-icons 支持 TypeScript 吗?

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

@adobe/spectrum-css-workflow-icons 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@adobe/spectrum-css-workflow-icons 可以商用吗?

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

@adobe/spectrum-css-workflow-icons 的下载量有多少?

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

@adobe/spectrum-css-workflow-icons 还在维护吗?

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