@devslab/dds-icons

中文文档
0.33.0发布于 2026/11/12SEE LICENSE IN LICENSETypeScriptES Module零依赖构建来源已验证近 30 天下载 3505

DDS icon set — one SVG source (24 grid, currentColor), shipped as files, a sprite and a path-data map

原始使用文档
文档目录3 节
  1. Two sets
  2. Rules (enforced by scripts/check-icons.mjs , so CI fails, n…
  3. Not here on purpose

@devslab/dds-icons

Directional consumers add dds-icon--directional; the packaged direction-policy.json is the source of truth for icons that mirror in RTL and icons whose physical direction must stay unchanged.

🌐 한국어

The DDS icon set — one SVG source per icon (24 grid, currentColor, round caps), shipped in the three shapes consumers actually need. Spec §3.7, as amended by D-013.

ArtifactImportFor
dist/svg/*.svg@devslab/dds-icons/svg/phone.svgbuild pipelines, <img>, design tools
dist/icons.svg@devslab/dds-icons/icons.svgweb sprite — <use href="…/icons.svg#dds-phone">
dist/icons.js (+ .d.ts)@devslab/dds-iconsany runtime that builds its own element (RN, createElementNS renderers, SSR)
import { icons } from "@devslab/dds-icons";

const i = icons.phone; // { viewBox, strokeWidth, set, body }
<!-- inline, inherits the surrounding color and font-size-independent size -->
<button class="dds-iconbtn" aria-label="Call">
  <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor"
       stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
    <!-- icons.phone.body -->
  </svg>
</button>

Two sets

  • core (svg/*.svg, stroke 1.6) — product UI. Names are function-shaped (chevron-down, external-link, globe — the flag-less fallback for a language-picker trigger); the 22 names inherited from the AskLinq widget keep their exact spelling, because renaming them would break live card icons.
  • site (svg/site/site-*.svg, stroke 1.8) — devslab.kr only, drawn for 32–40px marketing display. The site- prefix is part of the name; the folder is only organization.

Product controls use settings for preferences (a gear), log-out for signing out (a door with an outward arrow), search for search fields and chevron-down for selection triggers. tool remains the repair/tool action; arrow-right remains directional navigation.

Rules (enforced by scripts/check-icons.mjs, so CI fails, not review)

  • viewBox="0 0 24 24", width/height 24
  • fill="none", stroke="currentColor", round cap and join
  • no color literal anywhere in the file, and no stroke/fill/style overrides in the body — color and weight are inherited, always
  • stroke width is the set's (1.6 core / 1.8 site); a third value means an icon was dropped in from somewhere else
  • lowercase kebab-case names, no size or color in the name

Not here on purpose

No React/Vue/RN components are generated. Per spec §2 a framework package exists only once that framework's product does; a map of path data is what every consumer can build from today.

Live gallery: preview/icons.html (run pnpm build first).

版本与发布记录

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

版本发布日期距今
0.33.0latest2026/11/12今天
0.32.22026/11/111 天前
0.32.12026/11/102 天前
0.32.02026/11/102 天前
0.31.02026/11/092 天前
0.30.02026/11/084 天前

关于 @devslab/dds-icons 的常见问题

@devslab/dds-icons 是什么?

DDS icon set — one SVG source (24 grid, currentColor), shipped as files, a sprite and a path-data map

如何安装 @devslab/dds-icons?

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

@devslab/dds-icons 支持 TypeScript 吗?

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

@devslab/dds-icons 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@devslab/dds-icons 可以商用吗?

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

@devslab/dds-icons 的下载量有多少?

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

@devslab/dds-icons 还在维护吗?

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