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

@ubie/vitals-shadcn-theme

v0.1.0

Published

shadcn/ui compatible theme (CSS custom properties) powered by @ubie/vitals-token

Readme

@ubie/vitals-shadcn-theme

shadcn/ui 互換のテーマ(CSS カスタムプロパティ)を提供するパッケージです。@ubie/vitals-token の既存トークンを var() で参照し、shadcn の色変数(--background / --primary / --destructive など)として再公開します。

  • Tailwind v4 規約(@theme inline)をターゲット
  • light / dark 両モード対応(shadcn の .dark クラス規約)
  • 色のみを提供(--radius / --font-* 等は利用側で補完)
  • 値はコピーせず @ubie/vitals-token のトークンを名前参照

Installation

npm install @ubie/vitals-shadcn-theme @ubie/vitals-token

Usage

アプリのグローバル CSS(例: globals.css)で Tailwind の後に読み込みます。

@import "tailwindcss";
@import "@ubie/vitals-shadcn-theme/css";

/* このパッケージは色のみを提供します。radius / font は利用側で定義してください */
:root {
  --radius: 0.625rem;
}

これだけで shadcn/ui コンポーネントが bg-primary / text-foreground / border-border などのユーティリティをそのまま利用できます。

Dark mode

dark mode はクラスベースです。ルート要素に dark クラスを付与すると、.dark ブロックが @ubie/vitals-token の dark トークン(--dark-color-*)に切り替わります。

<html class="dark">
  <!-- ... -->
</html>

提供する変数

shadcn/ui の標準色変数を網羅します。

  • surface: --background / --foreground / --card(-foreground) / --popover(-foreground)
  • semantic: --primary(-foreground) / --secondary(-foreground) / --muted(-foreground) / --accent(-foreground) / --destructive(-foreground)
  • form / outline: --border / --input / --ring
  • chart: --chart-1--chart-5
  • sidebar: --sidebar / --sidebar-foreground / --sidebar-primary(-foreground) / --sidebar-accent(-foreground) / --sidebar-border / --sidebar-ring

--chart-*--sidebar-* は対応する semantic トークンが無いため、primitive トークン(--color-ubie-*)から割り当てています。

Tailwind 標準パレットの上書き

shadcn/ui は Tailwind をベースにしており、bg-blue-500 / text-gray-900 のような palette ユーティリティを多用します。これらを Ubie ブランド色にそろえるため、Tailwind 標準パレットを @ubie/vitals-token の primitive 色で上書きしています。

<div class="bg-blue-500 text-gray-900">...</div>

対象の色名(Tailwind 標準名 ← Ubie primitive):

  • white
  • gray / blue / sky / green / lime / yellow / red / pink / purple

スケールについて: 上書きは番号が一致する 100900 のみです。Tailwind 固有の 50 / 950 は Ubie に対応色が無いため Tailwind デフォルト色のまま 据え置き、Ubie 固有の 1000 は割り当て先が無いため未使用です。bg-blue-50 / bg-blue-950 は Tailwind デフォルト色になる点に注意してください。

Storybook

テーマを適用した shadcn/ui コンポーネント(vendoring 済み)と、カラートークン一覧を Storybook で確認できます。ツールバーの Theme から light / dark を切り替えられます。

pnpm dev:shadcn-theme
# または
pnpm --filter vitals-shadcn-theme dev
  • src/components/ui/ — shadcn/ui コンポーネントを vendoring(Tailwind v4 / New York スタイル)
  • src/stories/ — 各コンポーネントの stories と Colors(トークン一覧)

関連パッケージ