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

@kjaniec-dev/design

v0.8.0

Published

Design tokens and Tailwind v4 theme for the KJ Product Kit

Readme

@kjaniec-dev/design

Design tokens, theme configuration, and Tailwind CSS @theme bridge for the KJ Product Kit.

This package serves as the source of truth for all visual properties (colors, typography, spacing, border radii, shadows) used across the component library and any consumer applications.


1. How it Works

The design tokens are defined in a structured JSON schema and compiled into CSS assets for consumption:

  • tokens.json (Source of Truth): Contains token values for layout variables, light theme colors, dark theme colors, border radii, and box shadows.
  • build-tokens.js (Compiler): A build script that parses the tokens JSON and generates:
    • src/theme.css: Declares raw CSS custom properties (--kj-*). It maps variables under the :root pseudo-class and overrides them for the .dark selector (automatic dark mode).
    • src/tailwind.css: Contains Tailwind CSS @theme mapping directives, hooking the token values directly into the Tailwind v4 compilation pipeline.

2. Compile Tokens

To rebuild the theme stylesheets after modifying tokens.json, run:

npm run build

Note: The compile step runs automatically inside the prepublishOnly hook before publishing the package to npm.


3. Usage in Applications

Installation

Install the design tokens package alongside the companion React components library:

npm install @kjaniec-dev/design @kjaniec-dev/ui

Stylesheet Setup

Import the Tailwind theme bridge at the top of your global CSS stylesheet (Vite, Next.js, etc.):

@import "tailwindcss";
@import "@kjaniec-dev/design/tailwind.css";
@import "@kjaniec-dev/ui/ui.css";

Once imported, you can use any of the design kit theme mappings natively in your HTML or component class lists (e.g., bg-primary, text-primary-foreground, rounded-kj-md, shadow-kj-sm).


4. Theme Configuration

Colors and typography variables are declared semantically:

  • Primary/Secondary/Success/Warning/Danger/Info: Brand colors with automated hover and surface variants.
  • Canvas & Surface: Background tokens used for page layouts and card/panel elements.
  • Border & Ring: Layout boundary and focus indicator styles.

Dark Mode

Dark mode is activated simply by adding the .dark class to an ancestor container (e.g. <html> or <body>):

<html class="dark">
  <body class="bg-canvas text-foreground">
    <!-- Everything here automatically switches to dark-theme tokens -->
  </body>
</html>