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

@newtil/design-tokens

v0.2.0

Published

Shared CSS design tokens (variables) for the newtil ecosystem — colors, spacing, sizes, shadows, typography

Downloads

687

Readme

@newtil/design-tokens

newtil 생태계가 공유하는 CSS 디자인 토큰(변수) 패키지.

색상, 간격(spacing), 사이즈, 그림자, 타이포그래피 등 모든 디자인 결정의 단일 진실 공급원(single source of truth).

설계 철학

이 패키지는 newtil 디자인 시스템의 기반(foundation) 입니다.

  • @newtil/components — 컴포넌트가 이 토큰을 참조함
  • @newtil/css — utility 클래스가 이 토큰을 참조함

사용자는 이 토큰만 재정의하면 두 패키지의 모든 컴포넌트·유틸이 일관되게 변합니다.

설치

npm install @newtil/design-tokens

사용

@import "@newtil/design-tokens";

이렇게 하면 :root에 모든 CSS 변수가 정의됩니다.

구조 — 2-레이어

  • Primitive (--_* prefix): raw 값의 저장소. 내부용.
    • --_scale-* (길이 계단)
    • --_hue-{name}-{shade} (색상 팔레트)
    • --_radius-scale-*, --_font-scale-*, --_shadow-elev-*
  • Semantic: 역할 기반. 사용자·컴포넌트가 쓰는 토큰.
    • Brand: --color-primary, --color-secondary, --color-tertiary (각 -hover/-active/-subtle/-on-*)
    • Status: --color-success, --color-warning, --color-danger (동일 패턴)
    • Surface/Text/Border: 역할 기반 (--color-surface, --color-text, --color-border 등)
    • 전경색: --color-on-primary 등 (Material Design on- prefix 관례)
    • --space-*, --size-*, --radius-*, --border-width-*
    • --font-size-* (역할 body/heading-* + 스케일 sm/md/lg/xl 둘 다)
    • --z-*, --opacity-*, --shadow-*, --duration-*, --ease-*

카테고리별 Import

특정 카테고리만 필요하면:

@import "@newtil/design-tokens/semantic/color.css";
@import "@newtil/design-tokens/semantic/spacing.css";

커스터마이징

Semantic 오버라이드 (권장):

@import "@newtil/design-tokens";

:root {
	--color-primary: #ff6b00;
	--space-4: 1.25rem;
}

Primitive 오버라이드 (고급 — 팔레트 전체 교체):

:root {
	--_hue-green-500: #8cba35;
	--_hue-green-600: #6e9528;
	/* ... */
}

다크모드

  • 시스템 자동: @media (prefers-color-scheme: dark) 자동 반영 — 별도 코드 불필요.
  • 수동 강제: <html data-theme="dark"> 또는 <html data-theme="light">.

출처

이 패키지는 @newtil/[email protected]에서 분리되어 나왔습니다. 원본 commit: 2f5cc313c563222ddfb7231b780cce6a384dabd9

라이선스

MIT