@alto-avios/alto-tokens

中文文档
3.15.1发布于 2026/10/02MITTypeScriptESM + CJS零依赖近 30 天下载 3515

Design Tokens for IAGL

原始使用文档
文档目录11 节
  1. Overview
  2. Local Development
  3. Prerequisites
  4. Build Tokens
  5. Style Dictionary
  6. Project Structure
  7. Installation
  8. Fonts
  9. Requesting CORS Access
  10. Update
  11. License

Alto Tokens

license

Zeroheight Documentation

Overview

The @alto-avios/alto-tokens package contains design tokens for IAGL, generated using Style Dictionary to ensure consistent styles across applications for both web and app development.

This package includes pre-built tokens that can be easily integrated into your projects, with support for transforms, filters, and output formats using Style Dictionary. The generated tokens are placed in the dist/alto-tokens folder after build.

Local Development

Prerequisites

Before setting up the project, ensure you have the following installed on your local machine:

  • Node.js: v20.11.1 (as recommended)
  • NPM: Comes with Node.js
  • nvm: (Optional, but recommended for managing Node versions)

Build Tokens

To build tokens, use the following command:

npm run build:tokens

Style Dictionary

We are using Style Dictionary v4 to handle the transformation and generation of the design tokens. Additionally, we utilize the @tokens-studio/sd-transforms package for advanced transformations.

For more information on how to work with Style Dictionary, refer to their documentation.

Project Structure

utils/: Folder which stores the custom config, transforms, filters and formats. dist/: Distribution folder where the generated tokens will be placed after the build process. raw-tokens/: The exported json files from figma.

Installation

To install the package, run

npm i @alto-avios/alto-tokens

Your newly generated tokens can be found in a folder named: /dist

Fonts

Each brand has a fonts.css file containing brand-specific font-face definitions. You can import this file directly into your React or Next.js application to apply the correct fonts for each brand.

To use a brand's fonts in your project:

  1. Ensure you’ve installed @alto-avios/alto-tokens as described above.

  2. Import the fonts.css file for the brand you need:

// Example for "aer-lingus" brand in a React component import '@alto-avios/alto-tokens/web/aer-lingus/fonts.css';

Replace "aer-lingus" with the desired brand, such as "british-airways", "vueling", etc.

Requesting CORS Access

If you’re using these resources on a domain that is not currently allowed in our CORS policy, please contact us to request access. Provide the exact domains or subdomains that require access (e.g., https://storybook.design.dev.iagl.digital or https://stg.iagl.digital). We will add these domains to the S3 CORS policy to ensure seamless integration.

Update

Check if an update exists:

npm outdated

If an update is available, update the package:

npm update @alto-avios/alto-tokens

License

This project is licensed under the terms of the MIT license.

版本与发布记录

@alto-avios/alto-tokens 共发布 39 个版本,首次发布于 2024/07/22;过去 12 个月发布了 10 个版本。

版本发布日期距今
3.15.1latest2026/10/021 个月前
3.15.02026/09/241 个月前
3.14.02026/07/273 个月前
3.13.02026/07/203 个月前
3.12.02026/04/176 个月前
3.11.02026/03/257 个月前

其他发布通道:alpha → 3.3.1-alpha.0。

关于 @alto-avios/alto-tokens 的常见问题

@alto-avios/alto-tokens 是什么?

Design Tokens for IAGL

如何安装 @alto-avios/alto-tokens?

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

@alto-avios/alto-tokens 支持 TypeScript 吗?

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

@alto-avios/alto-tokens 支持 ESM 还是 CommonJS?

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

@alto-avios/alto-tokens 可以商用吗?

@alto-avios/alto-tokens 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@alto-avios/alto-tokens 的下载量有多少?

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

@alto-avios/alto-tokens 还在维护吗?

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