npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@archzos/tokens

v1.0.0

Published

Universal design tokens for Archzos design system - single source of truth for all platforms

Downloads

63

Readme

@archzos/tokens

Universal design token system for the Archzos design system. Single source of truth for colors, typography, spacing, and more across all platforms.

npm version License: MIT

Installation

npm install @archzos/tokens
# or
yarn add @archzos/tokens
# or
pnpm add @archzos/tokens

Usage

JavaScript/TypeScript

import { colors, typography, spacing, radius } from '@archzos/tokens';

// Use tokens in your styles
const styles = {
  color: colors.blue500,
  fontSize: typography.lg,
  padding: spacing.md,
  borderRadius: radius.lg
};

CLI Tool

Export tokens to any platform format:

# Export to specific format
npx @archzos/tokens export --format css
npx @archzos/tokens export --format dart
npx @archzos/tokens export --format swift
npx @archzos/tokens export --format kotlin

# Export all formats at once
npx @archzos/tokens export --all

# Validate token parity across platforms
npx @archzos/tokens validate

Supported Platforms

| Platform | Format | Usage | |----------|--------|-------| | Web (CSS) | CSS Variables | var(--az-color-blue500) | | Flutter | Dart Constants | AzTokens.Colors.blue500 | | iOS/WatchOS/tvOS | Swift | AzTokens.Colors.blue500 | | Android/WearOS | Kotlin | AzTokens.Colors.blue500 | | React Native | JSON/JS | tokens.colors.blue500 | | Web (SCSS) | SCSS Variables | $az-color-blue500 | | Android (XML) | Resources | @color/az_blue500 |

Token Categories

Colors (29 tokens)

  • Backgrounds: bg, bgSecondary, bgTertiary, bgDark
  • Text: text, textSecondary, textTertiary, textInverse
  • Borders: border, borderLight, borderDark
  • Semantic: blue500, green500, red500, yellow500
  • Grays: gray50 through gray900

Typography (18 tokens)

  • Font families: fontFamily, fontFamilyMono
  • Font sizes: xs (12px) through 9xl (128px)
  • Font weights: thin (100) through black (900)
  • Line heights: tight (1.2), normal (1.5), relaxed (1.6)

Spacing (13 tokens)

  • Scale: 0 (0px) through 96 (384px)
  • Common: xs, sm, md, lg, xl, 2xl, 3xl

Border Radius (7 tokens)

  • Scale: none (0) through full (9999px)
  • Common: sm, md, lg, xl, 2xl, 3xl

Shadows (5 tokens)

  • Elevations: none, sm, md, lg, xl

Z-Index (6 tokens)

  • Layers: base (0) through tooltip (1000)

API

TokenCompiler

import { TokenCompiler } from '@archzos/tokens';

const compiler = new TokenCompiler();

// Export tokens
await compiler.export('css');
await compiler.exportAll();

// Validate token parity
const isValid = await compiler.validate();

Export Functions

import {
  toCSSVariables,
  toDart,
  toSwift,
  toKotlin,
  toJSON,
  toSCSS,
  toAndroidXML
} from '@archzos/tokens';

// Convert tokens to specific format
const cssVars = toCSSVariables(tokens);
const dartCode = toDart(tokens);
const swiftCode = toSwift(tokens);

Examples

React Component

import { colors, spacing, radius, typography } from '@archzos/tokens';

function Button({ children }) {
  return (
    <button
      style={{
        backgroundColor: colors.blue500,
        color: colors.textInverse,
        padding: `${spacing.sm}px ${spacing.md}px`,
        borderRadius: radius.md,
        fontSize: typography.md,
        fontWeight: typography.semibold,
      }}
    >
      {children}
    </button>
  );
}

CSS-in-JS

import { colors, spacing } from '@archzos/tokens';

const styles = {
  container: {
    backgroundColor: colors.bg,
    padding: spacing.lg,
    border: `1px solid ${colors.border}`,
  },
};

Styled Components

import styled from 'styled-components';
import { colors, spacing, radius } from '@archzos/tokens';

const Card = styled.div`
  background: ${colors.bg};
  padding: ${spacing.lg}px;
  border-radius: ${radius.lg}px;
  box-shadow: ${shadows.md};
`;

Platform Integration

Flutter Setup

# Export tokens to Dart
npx @archzos/tokens export --format dart --output lib/tokens.dart
import 'package:your_app/tokens.dart';

Container(
  color: AzTokens.Colors.blue500,
  padding: EdgeInsets.all(AzTokens.Spacing.md),
)

Swift/iOS Setup

# Export tokens to Swift
npx @archzos/tokens export --format swift --output Sources/Tokens.swift
import SwiftUI

Text("Hello")
  .foregroundColor(AzTokens.Colors.blue500)
  .padding(AzTokens.Spacing.md)

Android/Kotlin Setup

# Export tokens to Kotlin
npx @archzos/tokens export --format kotlin --output src/main/java/Tokens.kt
Text(
  text = "Hello",
  color = AzTokens.Colors.blue500,
  modifier = Modifier.padding(AzTokens.Spacing.md.dp)
)

Configuration

Create .archzosrc.json in your project root:

{
  "tokens": {
    "output": "./src/design-tokens",
    "formats": ["css", "json"],
    "customPrefix": "my-app"
  }
}

Contributing

Tokens are the foundation of the Archzos design system. Changes to token values affect all platforms and should be made carefully.

  1. Edit tokens in src/tokens.ts
  2. Run pnpm build to compile
  3. Run pnpm export:all to generate all formats
  4. Run pnpm validate to ensure parity
  5. Submit PR with rationale for changes

License

MIT © archzos