@aurodesignsystem/design-tokens

中文文档
9.4.3发布于 2026/11/07Apache-2.0ES Module零依赖构建来源已验证近 30 天下载 8.5万

Alaska Air Auro Design System token repository

原始使用文档
文档目录17 节
  1. Overview
  2. Installation
  3. Quick Start
  4. CSS Custom Properties
  5. With Sass
  6. JavaScript Usage
  7. Available Themes
  8. Applying a Theme
  9. Nested Themes
  10. Partial Theme Overrides (Color or Typography Only)
  11. Color-only override
  12. Typography-only override
  13. Combining partial overrides
  14. Documentation
  15. Package Structure
  16. Contributing
  17. License

Auro Design Tokens

Build Status See it on NPM! License

Overview

Auro Design Tokens are the foundation of the Auro Design System, providing consistent design values across different platforms and implementations. These tokens define colors, typography, spacing, and other visual attributes for Alaska Airlines and Hawaiian Airlines brands.

Installation

npm install @aurodesignsystem/design-tokens

Quick Start

CSS Custom Properties

For most web applications, using CSS Custom Properties is recommended:

// In a React or similar application
import "@aurodesignsystem/design-tokens/dist/themes/alaska/CSSCustomProperties--alaska.css"
<!-- In an HTML file -->
<link rel="stylesheet" href="node_modules/@aurodesignsystem/design-tokens/dist/themes/alaska/CSSCustomProperties--alaska.css">

With Sass

When working with Sass:

@import "~@aurodesignsystem/design-tokens/dist/themes/alaska/primitives--alaska.scss";

JavaScript Usage

import { AuroColorAlertNotificationOnLight } from '@aurodesignsystem/design-tokens/dist/legacy/auro-classic/JSVariables--color.js';

Available Themes

Auro Design Tokens support multiple themes:

ThemeDescriptionUsage
AlaskaCurrent Alaska Airlines themeAlaska Airlines branded interfaces
Alaska ClassicTransition theme with the latest token names but Auro Classic valuesFor migration scenarios only
AtmosCurrent Atmos themeAtmos branded interfaces
HawaiianHawaiian Airlines themeHawaiian Airlines branded interfaces
Auro ClassicLegacy theme (deprecated)Only for backward compatibility

Applying a Theme

Apply a theme to any element using the data-aag-theme attribute. All child elements will inherit the theme's design tokens.

<html data-aag-theme="aag-theme-as">
  <!-- All content uses Alaska theme tokens -->
</html>

Available theme codes:

ThemeAttribute Value
Alaskaaag-theme-as
Alaska Classicaag-theme-asc
Hawaiianaag-theme-ha
Atmosaag-theme-atm

Nested Themes

You can nest themes by applying a different data-aag-theme value to a child element. The child and its descendants will use the nested theme's tokens, while the rest of the page retains the parent theme.

<html data-aag-theme="aag-theme-as">
  <!-- Alaska theme -->
  <header>...</header>

  <section data-aag-theme="aag-theme-ha">
    <!-- Hawaiian theme within this section only -->
    <p>This content uses Hawaiian tokens.</p>
  </section>

  <!-- Back to Alaska theme -->
  <footer>...</footer>
</html>

Partial Theme Overrides (Color or Typography Only)

Themes are split into color and typography token groups. You can apply just one aspect of a theme without affecting the other by appending -color or -type to the attribute value.

Color-only override

Apply a theme's color tokens while keeping the parent theme's typography:

<html data-aag-theme="aag-theme-as">
  <!-- Alaska color + Alaska typography -->

  <section data-aag-theme="aag-theme-ha-color">
    <!-- Hawaiian colors, but still Alaska typography -->
    <p>Hawaiian color palette with Alaska fonts.</p>
  </section>
</html>

Typography-only override

Apply a theme's typography tokens while keeping the parent theme's colors:

<html data-aag-theme="aag-theme-as">
  <!-- Alaska color + Alaska typography -->

  <section data-aag-theme="aag-theme-ha-type">
    <!-- Hawaiian typography, but still Alaska colors -->
    <p>Hawaiian fonts with Alaska color palette.</p>
  </section>
</html>

Combining partial overrides

You can stack both partial selectors on the same element to mix color from one theme and typography from another:

<html data-aag-theme="aag-theme-as">
  <section data-aag-theme="aag-theme-ha-color">
    <div data-aag-theme="aag-theme-atm-type">
      <!-- Hawaiian colors + Atmos typography -->
    </div>
  </section>
</html>

Documentation

For comprehensive documentation, please see our:

Package Structure

The npm package provides pre-processed resources in the ./dist/ directory organized by theme.

Contributing

Please read our contributing guidelines for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

版本与发布记录

@aurodesignsystem/design-tokens 共发布 108 个版本,首次发布于 2023/09/14;过去 12 个月发布了 36 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
9.4.3latest2026/11/07今天
9.4.22026/11/061 天前
9.4.12026/09/221 个月前
9.4.02026/09/221 个月前
9.3.32026/08/142 个月前
9.3.22026/07/283 个月前

关于 @aurodesignsystem/design-tokens 的常见问题

@aurodesignsystem/design-tokens 是什么?

Alaska Air Auro Design System token repository

如何安装 @aurodesignsystem/design-tokens?

在项目目录运行 npm install @aurodesignsystem/design-tokens,或使用 pnpm add / yarn add / bun add。

@aurodesignsystem/design-tokens 支持 TypeScript 吗?

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

@aurodesignsystem/design-tokens 支持 ESM 还是 CommonJS?

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

@aurodesignsystem/design-tokens 需要什么版本的 Node.js?

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

@aurodesignsystem/design-tokens 可以商用吗?

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

@aurodesignsystem/design-tokens 的下载量有多少?

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

@aurodesignsystem/design-tokens 还在维护吗?

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