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

@life-ds/tokens

v1.0.6

Published

Life Design System Tokens

Readme

@life-ds/tokens

Life Design System 的设计令牌 (Design Tokens) 核心包。

该包通过调用 Figma API 自动提取最新的设计变量,并将其转换为跨端可用的 CSS Variables。它是构建 Life Design System Web 组件和相关界面的基石,确保了设计语言的高度一致性。

安装

npm install @life-ds/tokens

使用

将 CSS 文件直接引入到你的入口文件(如 main.tsx, index.jsindex.html)中:

// 在 JS/TS 中引入
import '@life-ds/tokens/life-ds-tokens.css';

或者在 HTML 中:

<link rel="stylesheet" href="node_modules/@life-ds/tokens/life-ds-tokens.css">

注意: 推荐通过 @life-ds/components-web 的 CLI 工具 (npx @life-ds/components-web init) 来自动提取并引入所有的设计资产。

包含的 Token 范围

  • 颜色 (Colors): 包括主色、中性色、成功/警告/危险状态色、文本色、背景色、边框色等。支持 Light/Dark 主题切换。
  • 排版 (Typography): 字体族 (Font Family)、字号 (Font Size)、行高 (Line Height) 等文字相关的定义。
  • 间距与尺寸 (Spacing & Sizing): 统一的间距比例。
  • 圆角 (Border Radius): 统一的圆角变量。
  • 阴影与特效 (Effects): 预定义的阴影 (Box Shadow) 变量。

开发者脚本

如果你是 Life Design System 的维护者,需要从 Figma 更新 Token,请执行以下步骤:

  1. 在项目根目录创建 .env.local 文件,并添加 FIGMA_TOKEN=你的Figma个人访问令牌
  2. 运行同步命令:
# 在 monorepo 根目录下运行
npm run sync-tokens

这会自动执行位于 scripts/ 下的 Node.js 脚本,连接 Figma 并生成最新的 life-ds-tokens.css