@atlaskit/theme

中文文档
28.2.5发布于 2026/10/14Apache-2.0TypeScriptESM + CJS近 30 天下载 188.9万

Deprecated legacy theming utilities. Use design tokens and Atlassian Design System components instead.

此软件包已被标记为弃用

This package is deprecated and is no longer maintained or supported.

原始使用文档

Theme

Deprecated: @atlaskit/theme is deprecated. Use design tokens, Atlassian Design System components, or Top Layer as appropriate.

Migration

  • Replace color, spacing, typography, elevation, and other styling values with design tokens from @atlaskit/tokens.
  • Replace layers with an Atlassian Design System layered component where possible. When building a low-level overlay, use @atlaskit/top-layer. Top Layer manages overlay stacking through the browser's top layer; it is not a numeric z-index map and is not a drop-in replacement for layers.
  • Replace Theme, createTheme, getTheme, and their associated types with design tokens and the supported customization APIs of the relevant Atlassian Design System component. There is no package-wide, one-to-one replacement for these legacy theming APIs.
  • Remove direct use of legacy theme constants and types when no replacement is required.

Do not add new dependencies on this package.

版本与发布记录

@atlaskit/theme 共发布 221 个版本,首次发布于 2017/08/11;过去 12 个月发布了 30 个版本。

版本发布日期距今
28.2.5latest2026/10/1424 天前
28.2.42026/09/241 个月前
28.2.32026/09/231 个月前
28.2.22026/09/171 个月前
28.2.12026/09/151 个月前
28.2.02026/08/302 个月前

其他发布通道:next → 12.5.3。

关于 @atlaskit/theme 的常见问题

@atlaskit/theme 是什么?

Deprecated legacy theming utilities. Use design tokens and Atlassian Design System components instead.注意:该包已被作者标记为弃用——This package is deprecated and is no longer maintained or supported.

如何安装 @atlaskit/theme?

在项目目录运行 npm install @atlaskit/theme,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.2.0 || ^19.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@atlaskit/theme 支持 TypeScript 吗?

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

@atlaskit/theme 支持 ESM 还是 CommonJS?

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

@atlaskit/theme 可以商用吗?

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

@atlaskit/theme 的下载量有多少?

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

@atlaskit/theme 还在维护吗?

最新版本 28.2.5 发布于 2026/10/14(24 天前);至今共发布 221 个版本,其中过去 12 个月发布了 30 个;首次发布于 2017/08/11。作者已将其标记为弃用,新项目建议寻找替代方案。