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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@payfit/unity-themes

v2.0.0

Published

The Unity themes package provides a comprehensive design system using TailwindCSS 4, converting all the design tokens of the Unity design system into TailwindCSS utility classes. This is the foundational part of the unity design system and is heavily used

Readme

Unity Themes

The Unity themes package provides a comprehensive design system using TailwindCSS 4, converting all the design tokens of the Unity design system into TailwindCSS utility classes. This is the foundational part of the unity design system and is heavily used by the components package and other unity packages.

Note: This is version 1.x of Unity Themes, built for TailwindCSS 4. If you're migrating from v0.x, see MIGRATIONS.md. For legacy documentation, see README-v0.md.

Installation

Install and configure this package by following these steps:

  1. Install the package and dependencies

    yarn add tailwindcss @fontsource/{inter,source-serif-4}
    yarn add @payfit/unity-themes
  2. Set up TailwindCSS in your project

    You need to configure TailwindCSS 4 in your project. This can be done using either the Vite plugin or PostCSS plugin:

  3. Import Unity Themes in your main CSS file

    /* /path/to/your/main/styles.css */
    @import '@payfit/unity-themes/css/unity.css';

    That's it! The Unity CSS file includes all font imports and TailwindCSS configuration.

  4. Use the utility classes in your elements

    <button class="uy:bg-surface-primary uy:text-surface-inverted">
      hello!
    </button>

JavaScript Utilities

If you need to use JavaScript utilities (like uyMerge for class merging), import them normally:

import { uyMerge } from '@payfit/unity-themes'

const className = uyMerge('uy:bg-red-l1', 'uy:bg-blue-l2') // 'uy:bg-blue-500'

Usage

Use Unity utility classes with the uy: prefix:

<button
  class="uy:bg-surface-primary uy:text-surface-inverted uy:hover:bg-surface-secondary"
>
  Hello Unity!
</button>

Class Syntax

Unity classes use the uy: prefix and the prefix goes before any modifiers:

<div class="uy:bg-red-l1 uy:hover:bg-red-l2 uy:md:text-lg"></div>

CSS properties

Access design tokens directly via CSS custom properties:

const MyComponent = ({ isHighlighted }) => {
  const bgColor = isHighlighted ? 'var(--color-grayscale-l9)' : 'transparent'
  return (
    <div className="uy:transition-colors" style={{ backgroundColor: bgColor }}>
      Custom styling with design tokens
    </div>
  )
}

Documentation

  • Architecture: Technical details, build process, and internal structure
  • Migrations: Complete guide for migrating from v0.x to v1.x
  • Legacy v0.x: Documentation for the previous version

Design Tokens

Design tokens are sourced from Unity's Figma design system and organized in the tokens/ directory:

tokens/
├── colors.json      # Color palette and semantic colors
├── typography.json  # Font families, sizes, and text styles
├── spacings.json   # Spacing scale and layout values
├── shadows.json    # Box shadow definitions
├── radii.json      # Border radius values
├── layout.json     # Grid and container sizes
├── sizes.json      # Component and element sizes
└── text.json       # Text-specific tokens

Development

# Build the package
yarn nx run unity-themes:build

# Run tests
yarn nx run unity-themes:test