@agentatom/design-system

中文文档
1.4.100发布于 2026/11/07TypeScriptESM + CJS近 30 天下载 3348

Atom Design System — design tokens and React components

原始使用文档
文档目录7 节
  1. Install
  2. Usage
  3. Package contents
  4. Font contract
  5. Locale
  6. Appearance (optional)
  7. Version

Atom Design System

Design tokens and React components for Atom products. Same component API as the shared core; Signal brand tokens are baked into tokens.css. Does not include foreign product skins (round / editorial). Use light.css for Snow light theme. Host loads Onest + JetBrains Mono webfonts.

Install

npm install @agentatom/design-system

Usage

import '@agentatom/design-system/tokens.css';
// optional:
// import '@agentatom/design-system/light.css';
// import '@agentatom/design-system/high-contrast.css';

import { Button, Input, Card, LocaleProvider } from '@agentatom/design-system';

Package contents

Shared components + Atom brand tokens (Signal / Graphite / Onest).

Not included: product skins data-variant=round / data-typography=editorial. Those ship only in the sibling brand package. Leftover host attributes for those skins are a no-op here.

Font contract

This package does not embed font binaries. Host loads webfonts (e.g. public/fonts/) and must match the families in CSS variables.

RoleCSS variableFamilyFiles (host)
UI--font-uiOnestOnest-Variable.woff2
Mono--font-monoJetBrains MonoJetBrainsMono-Variable.woff2

Host also owns product chrome (wordmark, favicon, platform_name) — not this package.

Font binaries are NOT in the package. Host must load fonts.files under public/fonts (or equivalent) and keep --font-ui / --font-mono in sync. Package does not ship data-variant=round or data-typography=editorial.

Locale

Chrome strings (Close, Loading, …) default to English. Override via LocaleProvider:

import { LocaleProvider } from '@agentatom/design-system';

<LocaleProvider strings={{ close: 'Закрыть', loading: 'Загрузка' }}>
  <App />
</LocaleProvider>

Appearance (optional)

import appearance from '@agentatom/design-system/appearance.json';
// { brand, themes, variants, typography, density, fonts }
brandthemesvariantstypography
atomlight, high-contrast——

Version

1.4.100 — dual-brand publish from one monorepo commit. Package contents = applicable surface for this brand only.

版本与发布记录

@agentatom/design-system 共发布 23 个版本,首次发布于 2026/08/05;过去 12 个月发布了 23 个版本。

版本发布日期距今
1.4.100latest2026/11/071 天前
1.4.992026/11/061 天前
1.4.982026/11/034 天前
1.4.972026/11/025 天前
1.4.962026/10/2018 天前
1.4.952026/10/021 个月前

关于 @agentatom/design-system 的常见问题

@agentatom/design-system 是什么?

Atom Design System — design tokens and React components

如何安装 @agentatom/design-system?

在项目目录运行 npm install @agentatom/design-system,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=18.0.0 <21.0.0)、react-dom(>=18.0.0 <21.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@agentatom/design-system 支持 TypeScript 吗?

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

@agentatom/design-system 支持 ESM 还是 CommonJS?

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

@agentatom/design-system 可以商用吗?

@agentatom/design-system 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@agentatom/design-system 的下载量有多少?

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

@agentatom/design-system 还在维护吗?

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