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

@axis-ds/tokens

v1.8.2

Published

AXIS Design System - Design Tokens (CSS Variables + JSON)

Readme

@axis-ds/tokens

AXIS Design System의 디자인 토큰 패키지입니다. 색상, 타이포그래피, 간격 등의 토큰을 CSS 변수, JSON, JS 형태로 제공합니다.

설치

npm install @axis-ds/tokens
# or
pnpm add @axis-ds/tokens

사용법

CSS Variables (AXIS 네이티브)

@import '@axis-ds/tokens/css';

Light/Dark 모드를 모두 포함하며, .dark 클래스로 다크모드가 활성화됩니다.

shadcn/ui 호환 CSS Variables

외부 프로젝트에서 AXIS 컴포넌트를 사용할 때 권장하는 방식입니다.

@import '@axis-ds/tokens/css/shadcn';

별도의 globals.css CSS Variables 설정 없이 shadcn 호환 변수(--background, --primary 등)가 자동으로 설정됩니다.

Tailwind CSS 4

Tailwind CSS 4(@import "tailwindcss", create-next-app 15.5 기본)에서는 전역 CSS 에 한 줄을 더합니다.

/* app/globals.css */
@import "tailwindcss";
@import "@axis-ds/tokens/css/tailwind4";
  • 아래 Tailwind 3 preset 과 같은 매핑(색 24 · radius 3 · 글꼴 3 · animate 3)을 @theme inline 으로, keyframes 3개(accordion-down · accordion-up · progress-indeterminate)를 @keyframes 로 정의하고, 다크 모드는 .dark 클래스(@custom-variant dark)로 맞춥니다. bg-primary · rounded-md · font-mono · dark:bg-primary 가 AXIS 변수(--primary · --radius · --axis-font-family-mono)로 생성됩니다.
  • 토큰 변수(@axis-ds/tokens/css · @axis-ds/tokens/css/shadcn)를 base 레이어로 함께 불러오므로 따로 import 하지 않아도 됩니다. base 레이어라서 border-red-500 같은 유틸리티가 기본 테두리색보다 우선합니다.
  • @import "tailwindcss" 뒤에 둡니다. 브랜드 CSS(@axis-ds/tokens/css/brands/ontology 등)는 이 줄 뒤에 import 합니다.
  • create-next-app 기본 globals.css 의 :root { --background: ...; --foreground: ... }(다크용 @media 포함)와 body { background: var(--background) } 는 AXIS 의 같은 이름 변수(HSL 값)를 덮어써 bg-background 를 무효로 만듭니다. 같은 파일의 기본 @theme inline(--color-background · --font-sans · --font-mono 등)도 이 진입점의 매핑을 덮어써 font-mono 가 AXIS 글꼴이 아니게 됩니다. 이 블록들은 지웁니다.
  • Tailwind 4 는 node_modules 를 스캔하지 않습니다. AXIS 컴포넌트 패키지를 쓰면 그 패키지의 클래스가 생성되도록 스캔 경로(@source)도 필요합니다. @axis-ds/ui-react · @axis-ds/agentic-ui 는 이 줄을 담은 tailwind.css 를 제공하므로 @import "@axis-ds/ui-react/tailwind.css"; 처럼 한 줄씩 더합니다.

Tailwind 3 preset 과 다르게 동작하는 것

  • dark: 변형은 Tailwind 4 공식 형태 @custom-variant dark (&:where(.dark, .dark *)) 입니다. Tailwind 3 preset(darkMode: ['class'])은 .dark 의 자손에만 적용되고 명시도가 클래스 하나만큼 올라가지만, 이 진입점은 .dark 를 붙인 요소 자신에도 적용되고 명시도를 올리지 않습니다.
  • 색을 지정하지 않은 border · border-t 는 이 진입점이 base 레이어로 불러오는 * { border-color: hsl(var(--border)) } 때문에 AXIS --border 색입니다. Tailwind 3 preset 은 1.8.1 부터 preflight 의 기본 테두리색을 hsl(var(--border, 220 13% 91%)) 로 정해 같은 색입니다(아래 「Tailwind CSS 3 Preset」).

Tailwind CSS 3 Preset

// tailwind.config.ts
import axisPreset from '@axis-ds/tokens/tailwind'

export default {
  presets: [axisPreset],
  content: ['./src/**/*.{ts,tsx}'],
}

CommonJS 설정(module.exports · .cjs)에서는 1.7.0 부터 require('@axis-ds/tokens/tailwind') 가 preset 자체를 돌려줍니다. 1.6.2 이하는 { default } 를 돌려줘 .default 없이 넣으면 preset 이 통째로 빠지므로(1.1.0 부터의 결함), 여러 버전에서 같은 설정을 쓰려면 .default 를 붙입니다. require(...).default 는 1.7.0 에서도 같은 preset 입니다.

// tailwind.config.js (CommonJS)
module.exports = {
  presets: [require('@axis-ds/tokens/tailwind').default],
  content: ['./src/**/*.{js,jsx}'],
}

preset 은 색 · rounded-* 를 shadcn 호환 변수(--primary · --radius 등)로 매핑하므로, 전역 CSS 에 토큰 CSS 와 @axis-ds/tokens/css/shadcn 을 함께 import 합니다. @import 는 @tailwind 지시문보다 앞에 둡니다.

/* globals.css */
@import '@axis-ds/tokens/css';
@import '@axis-ds/tokens/css/shadcn';
@import '@axis-ds/tokens/css/brands/ontology'; /* 브랜드를 쓸 때만 */

@tailwind base;
@tailwind components;
@tailwind utilities;
  • 색을 지정하지 않은 border · border-t · hr 는 1.8.1 부터 preset 이 preflight 의 기본 테두리색을 hsl(var(--border, 220 13% 91%)) 로 정해 다크 · 브랜드에서도 AXIS --border 색입니다. --border 를 정의하지 않은 앱(css/shadcn 을 넣지 않은 앱)은 fallback 인 종전 gray-200(rgb(229,231,235))입니다. 1.8.0 이하는 preflight 의 gray-200 이 css/shadcn 의 * { border-color } 를 이겨 다크 · 브랜드에서도 회색이므로 @tailwind utilities; 뒤에 @layer base { * { @apply border-border; } } 블록을 둡니다.
  • @axis-ds/tokens/css/shadcn 이 빠지면 --radius 가 정의되지 않아 rounded-* 가 0px 입니다. 브랜드를 켠 화면에서는 브랜드 CSS 가 --radius 를 정의해 드러나지 않다가 브랜드를 끄면 나타납니다.
  • 브랜드는 CSS import 만으로 켜지지 않습니다. <html data-brand="ontology"> 나 @axis-ds/theme 의 ThemeProvider 에 defaultBrand="ontology" · setBrand("ontology") 로 켭니다. ThemeProvider 1.6.2 이하는 브랜드 상태가 비면 마운트 때 마크업 data-brand 를 지우므로 그 버전에서는 defaultBrand 나 setBrand 가 필요합니다(1.7.0 부터 마크업을 초기값으로 읽음).
  • 글꼴은 스택("Pretendard Variable" 로 시작)만 지정하고 웹폰트(@font-face)는 담지 않습니다. Pretendard 는 앱에서 로드합니다(예: pretendard npm 패키지).

preset 은 @axis-ds/ui-react Accordion · Progress 가 쓰는 keyframes(animate-accordion-down · animate-accordion-up · animate-progress-indeterminate)도 정의합니다. preset 을 쓰지 않는 앱은 같은 정의만 가져올 수 있습니다.

import { axisAnimation, axisKeyframes } from '@axis-ds/tokens/tailwind'

export default {
  theme: { extend: { keyframes: axisKeyframes, animation: axisAnimation } },
}

Dialog · Popover 등의 열고 닫는 애니메이션(animate-in · fade-in-0 류)은 preset 에 없습니다. Tailwind 3 은 tailwindcss-animate, Tailwind 4 는 tw-animate-css 를 앱에 넣습니다(@axis-ds/ui-react README).

JavaScript / TypeScript

import { tokens } from '@axis-ds/tokens'

console.log(tokens.color.blue[500]) // '#3B82F6'

JSON

import tokens from '@axis-ds/tokens/json'

문서

자세한 사용법은 AXIS Design System 문서를 참고하세요.

라이선스

MIT