@digital-ai/dot-illustrations

中文文档
2.0.64发布于 2026/11/03SEE LICENSE IN <LICENSE.md>零依赖近 30 天下载 4777

A central place for the design team to keep illustrations and for dev teams to find them.

原始使用文档
文档目录14 节
  1. Contents
  2. Asset types
  3. Browse the demo
  4. Using illustrations
  5. React — DotIllustration via dot-components
  6. Standard HTML
  7. Using integration logos
  8. React — DotIllustration via dot-components
  9. Standard HTML
  10. Using task icons
  11. React — DotIllustration via dot-components
  12. Standard HTML
  13. Adding a new illustration or integration logo
  14. Troubleshooting

dot-illustrations

Central asset library for Digital.ai UX — illustrations and integration logos for use in products and documentation.

📖 Browse the demo →


Contents


Asset types

TypeFolderThemesReact component
Illustrationsillustrations/light/ + illustrations/dark/Light + DarkDotIllustration
Integration logosintegrations/Single (no dark variant)DotIllustration
Task iconstasks/Single (no dark variant)DotIllustration

Integration logos and task icons are DotIllustration, not a separate icon component — same component as Illustrations, just backed by a single-theme SVG instead of a light/dark pair. Task icons are new (S-135988) — fixed-color pipeline/workflow badge icons sourced from the dot atomic library (Figma node 27123-30795). 13 of the node's 15 icons are in scope (2 are excluded as AI-styled). SVGs are in place. See tasks/README.md for status.


Browse the demo

https://digital-ai.github.io/dot-illustrations/demo/**

The demo lets you:

  • Browse 73 illustrations (Global and Dashboards), 114 integration logos, and 13 task icons (Tasks section)
  • Switch between Illustrations, Integrations, and Tasks using the section switcher next to the search bar
  • Search with fuzzy autocomplete across both sections
  • Filter illustrations by A–Z (integrations only — 114 logos benefit from alphabet navigation)
  • Click any card to open a detail modal with the copy-ready code snippet
  • Star items to save them in your Favourites (persisted in your browser)
  • Upload a new illustration or integration logo from the browser (see Upload New)

Using illustrations

React — DotIllustration via dot-components

import { DotIllustration } from '@digital-ai/dot-components';

// Light (default)
<DotIllustration illustrationId="empty" />

// Dark
<DotIllustration illustrationId="done" theme="dark" />

// With tooltip
<DotIllustration illustrationId="features" tooltip="See all features" />

Full DotIllustration documentation →

Standard HTML

<link rel="stylesheet" href="./index.css" />

<!-- Light theme -->
<span class="dot-illustration">
  <img class="done light" />
</span>

<!-- Dark theme -->
<span class="dot-illustration">
  <img class="done dark" />
</span>

Always set an explicit width and height — the library has no built-in sizing defaults.


Using integration logos

React — DotIllustration via dot-components

import { DotIllustration } from '@digital-ai/dot-components';
import '@digital-ai/dot-illustrations/integrations/index.css';

<DotIllustration illustrationId="jenkins" className="dot-integration" ariaLabel="Jenkins" />

Workaround: DotIllustration doesn't support integration logos on its own. It loads only the root index.css and wraps the image in .dot-illustration, but integration rules are .dot-integration img.<id> in integrations/index.css. Import that file once in your app and pass className="dot-integration", which adds the class to the wrapper. Without both, the image renders empty.

Standard HTML

<link rel="stylesheet" href="./integrations/index.css" />

<span class="dot-integration">
  <img class="jenkins" />
</span>

Integration logos are single-theme only — they have no dark variant.


Using task icons

React — DotIllustration via dot-components

import { DotIllustration } from '@digital-ai/dot-components';

<DotIllustration illustrationId="task-manual" className="dot-task-icon" ariaLabel="Manual task" />

Workaround: DotIllustration doesn't support task icons on its own. It wraps the image in .dot-illustration, but task rules are .dot-task-icon img.<id>. They live in the root index.css, which dot-components already loads, so passing className="dot-task-icon" is enough. Without it, the image renders empty.

Standard HTML

<link rel="stylesheet" href="./index.css" />

<span class="dot-task-icon">
  <img class="task-manual" />
</span>

Task icons are single-theme only — fixed-color badges, no dark variant.

Status: the Tasks section ships with the browse/copy/upload UI wired up, the 13 in-scope icon IDs, and their SVGs are all in place — see tasks/README.md. Still open: publishing these as real iconIds in @digital-ai/dot-icons.


Step-by-step guide for designers: docs/adding-assets.md. It covers illustrations, integration logos and task icons: the Figma export, the files, the illustrations.json line, the check's messages and what happens after the merge.

In short, every asset is listed once in illustrations.json, and npm run build writes index.css, integrations/index.css, the demo lists and demo/descriptions.json from it. Don't edit those by hand.

  1. On a new branch, add the SVG files:

    KindFilesSize
    Illustrationillustrations/light/global/my-new-state.svg and illustrations/dark/global/my-new-state.svg (use dashboards/ for a dashboard illustration)248 × 248 (dashboards 353 × 212)
    Integration logointegrations/my-tool.svg40 × 40
    Task icontasks/my-task-icon.svg40 × 40
  2. Add one line to illustrations.json, at the end of its group (global illustrations, dashboard illustrations, integration logos, then task icons):

    {"id":"my-new-state","kind":"illustration","category":"global","label":"My new state","description":"This is the my-new-state illustration."},
    {"id":"my-tool","kind":"integration","category":null,"label":"My tool","description":null},
    {"id":"my-task-icon","kind":"task","category":null,"label":"My task icon task","description":null},
    

    Ids are lowercase with hyphens. label is the aria label the demo's copied code uses. category and description are only for illustrations.

  3. Run the build (Node 20 or later, no install needed), the tests and the check:

    npm run build
    npm test
    npm run check
    
  4. Commit the SVGs, illustrations.json and the files the build changed. Open a pull request and post in #dot-components on Slack for review.

Upload New in the demo does steps 1 and 2 in one commit, and checks each file and the id before it sends anything. The reviewer then runs npm run build on its branch and pushes before merging. It can't open pull requests from the hosted demo yet: the digital-ai organization's OAuth App access restrictions block its app. It works from a local copy of the demo with node demo/local-proxy.js. The guide has the steps.


Troubleshooting

Latest dot-illustrations not picked up by dot-components

Add a resolutions entry to your package.json:

"resolutions": {
  "@digital-ai/dot-illustrations": "latest"
}

Integration image not showing

Make sure the integrations CSS is imported: <link rel="stylesheet" href="./integrations/index.css" />. In React, also pass className="dot-integration" (see Using integration logos). The library uses content: url() on <img> elements — the <img> tag must have no src attribute and the class must match the integration ID exactly.


More information: dot design system — Illustrations

版本与发布记录

@digital-ai/dot-illustrations 共发布 94 个版本,首次发布于 2024/03/13;过去 12 个月发布了 31 个版本。

版本发布日期距今
2.0.64latest2026/11/038 天前
2.0.632026/11/038 天前
2.0.622026/11/038 天前
2.0.612026/11/038 天前
2.0.592026/11/029 天前
2.0.602026/11/029 天前

关于 @digital-ai/dot-illustrations 的常见问题

@digital-ai/dot-illustrations 是什么?

A central place for the design team to keep illustrations and for dev teams to find them.

如何安装 @digital-ai/dot-illustrations?

在项目目录运行 npm install @digital-ai/dot-illustrations,或使用 pnpm add / yarn add / bun add。

@digital-ai/dot-illustrations 支持 TypeScript 吗?

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

@digital-ai/dot-illustrations 可以商用吗?

@digital-ai/dot-illustrations 使用 SEE LICENSE IN <LICENSE.md> 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@digital-ai/dot-illustrations 的下载量有多少?

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

@digital-ai/dot-illustrations 还在维护吗?

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