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

@joycostudio/system

v0.1.1

Published

A peak into the design system

Readme

  @joycostudio/system

A Tailwind v4 CSS variable debugger and design system visualizer. Scans your stylesheets for CSS custom properties and renders an interactive UI to inspect colors, typography, spacing, shadows, and shadcn/ui theme tokens.

Installation

# npm
npm install @joycostudio/system

# pnpm
pnpm add @joycostudio/system

# yarn
yarn add @joycostudio/system

React >=16.8.0 is required as a peer dependency.

Quick Start

import { TailwindV4Debug } from '@joycostudio/system'

export default function DesignSystemPage() {
  return <TailwindV4Debug />
}

The component automatically scans all stylesheets loaded in the DOM and categorizes every CSS custom property it finds.

Usage

TailwindV4Debug Component

The main export. Renders a full-page debug UI with tabbed navigation, search, and visual previews.

import { TailwindV4Debug } from '@joycostudio/system'

// Auto-scan DOM stylesheets
<TailwindV4Debug />

// Pass raw CSS directly
<TailwindV4Debug css={rawCSSString} />

// Custom title
<TailwindV4Debug title="My Design System" />

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | css | string | undefined | Raw CSS content to scan instead of reading from the DOM | | title | string | "Tailwind v4 Debug" | Title displayed in the header |

scanVariables Function

Use this directly if you need programmatic access to the scanned variables without rendering the debug UI.

import { scanVariables } from '@joycostudio/system'

// Scan all DOM stylesheets
const vars = scanVariables()

// Or scan raw CSS
const vars = scanVariables(myCSSString)

console.log(vars.colors)      // CSSVariable[]
console.log(vars.shadcnTheme) // CSSVariable[]
console.log(vars.typography)  // CSSVariable[]
console.log(vars.spacing)     // CSSVariable[]
console.log(vars.radius)      // CSSVariable[]
console.log(vars.shadows)     // CSSVariable[]
console.log(vars.other)       // CSSVariable[]

What It Detects

Variables are automatically categorized based on naming conventions and resolved values:

| Category | Matched patterns | |----------|-----------------| | Colors | --color-* prefixed variables, plus any variable whose resolved value is a color (hex, rgb, hsl, oklch, oklab, etc.) | | shadcn/ui Theme | Standard shadcn/ui tokens: --background, --foreground, --primary, --secondary, --muted, --accent, --destructive, --card, --popover, --border, --input, --ring, --chart-*, --sidebar-*, --radius | | Typography | --text-*, --font-*, --tracking-*, --leading-*, --letter-spacing-*, --line-height-* | | Spacing | --spacing (base multiplier) and --spacing-* | | Radius | --radius and --radius-* | | Shadows | --shadow* | | Other | Everything else |

Debug UI Features

The TailwindV4Debug component provides:

  • Tab navigation — Filter by All, Theme, Colors, Typography, Spacing, or Components
  • Search — Real-time filtering across variable names and values
  • Color swatches — Visual previews grouped by color family with shade scales
  • shadcn/ui theme pairs — Background/foreground pairs shown as themed cards
  • Typography preview — Text sizes rendered at actual scale, font families with specimen text, and weight samples
  • Spacing scale — Visual bar chart of the full spacing scale computed from the base multiplier
  • Border radius — Shape previews for each radius token
  • Shadow gallery — Box shadow previews rendered on cards
  • Component previews — Live-rendered shadcn/ui components (Button, Badge, Input, Card, Tabs, Dialog, Popover) using your theme variables
  • Copy to clipboard — Click any variable to copy its name
  • Rescan — Re-read stylesheets without reloading the page

Types

type CSSVariable = {
  name: string          // e.g. "--color-blue-500"
  rawValue: string      // Value as written in the stylesheet
  resolvedValue: string // Computed value from getComputedStyle
}

type ColorGroup = {
  family: string        // e.g. "blue"
  variables: CSSVariable[]
}

type ScannedVariables = {
  colors: CSSVariable[]
  shadcnTheme: CSSVariable[]
  typography: CSSVariable[]
  spacing: CSSVariable[]
  radius: CSSVariable[]
  shadows: CSSVariable[]
  other: CSSVariable[]
}

type TailwindDebugProps = {
  css?: string
  title?: string
}

All types are exported from the package entry point.

Version Management

This library uses Changesets for version management.

# Create a changeset
pnpm changeset

# Apply version bumps
pnpm version:package

# Build and publish to npm
pnpm release

License

ISC