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

@openzeppelin/ui-builder-styles

v0.10.0

Published

Centralized styling system for the OpenZeppelin UI Builder.

Readme

Centralized Styling System

This package contains the centralized styling system for the UI Builder monorepo. It uses Tailwind CSS 4.0 with OKLCH colors and follows the new-york style from shadcn/ui.

Package Structure

styles/
├── src/                        # Source stylesheets and utilities
├── global.css                  # Main CSS file with theme variables and base styles
├── package.json                # Package configuration
├── tsconfig.json               # TypeScript configuration
├── tsup.config.ts              # Build configuration
└── README.md                   # This documentation

Key Files

  • global.css - Main CSS file with theme variables and base styles that's shared across all packages.
  • src/utils/ - Utility CSS files and styling functions (if any).
  • Configuration is centralized at the repo root and consumed by packages via lightweight JS proxy configs and copied JSON to ensure consistency.

Styling Approach

This monorepo utilizes a consistent styling approach driven by the consuming application:

  1. Centralized Theme: This @styles package provides the single source of truth for theme variables (colors, spacing, radius) and base styles in global.css.
  2. Centralized Configuration: Root-level tailwind.config.cjs, postcss.config.cjs, and components.json are consumed by packages using:
    • package-level JS proxy configs (tailwind.config.cjs, postcss.config.cjs) that require('../../...')
    • a per-package components.json file (regular JSON, not a symlink)
  3. Consumer-Driven Build: The main application (packages/builder) or exported applications are responsible for the Tailwind CSS build process.
  4. Automatic Content Scanning: Tailwind v4 automatically scans the source code of the application and its dependencies (like @openzeppelin/ui-builder-ui and @openzeppelin/ui-builder-renderer) for utility class usage.
  5. CSS Generation: The consumer app's build generates the final CSS file, including base styles from global.css, theme variables, and all necessary utility classes used throughout the application and its dependencies.

Key Point: Library packages like renderer and ui do not build or ship their own CSS. Styling is entirely managed by the final application build, ensuring consistency and leveraging the shared theme from this @styles package.

Features

  • Tailwind CSS 4.0: Using the latest Tailwind features including native cascade layers and OKLCH colors
  • Direct OKLCH color values: Variables use OKLCH values directly without nested references for simplicity
  • Unified theming: Consistent design tokens across all packages
  • Dark mode support: Built-in dark mode with proper variable handling
  • Shadcn/ui integration: Configured for the new-york style

CSS Variables

The system uses CSS variables for all theme colors and properties. These variables are defined directly with OKLCH values for better readability and maintenance:

:root {
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  /* ... other variables */
}

Form Component Spacing

Form components follow our design system with consistent spacing:

  • flex flex-col gap-2 - Used for form fields to create proper spacing between label and input
  • space-y-4 - Used for spacing between form fields in a group
  • space-y-6 - Used for spacing between form sections

Adding New Components

When adding new shadcn/ui components, use the root components.json config:

pnpm ui:add button

This ensures all components follow the same unified styling approach.

Configuration Architecture

This package provides centralized styling utilities and components used across all packages in the monorepo. The project uses a proxy-config approach (no symlinks) for consistency:

Root Configuration Files

The root directory contains these key configuration files:

  • tailwind.config.cjs: Shared Tailwind configuration with CSS variable-based theming
  • postcss.config.cjs: Shared PostCSS configuration for processing
  • components.json: Shared shadcn/ui component configuration

Package Integration

Packages that contain UI elements needing Tailwind processing (like builder, renderer, and ui) include:

  • tailwind.config.cjs and postcss.config.cjs as simple JS proxies that require('../../tailwind.config.cjs') and require('../../postcss.config.cjs')
  • a local components.json that points to the package's CSS entry (e.g., ../styles/global.css)

Exported Templates

During the export process:

  1. Template files in the builder package are used to create standalone projects
  2. Proxy configs and JSON are copied as needed to create standalone configuration files
  3. The styles from this package are included in the exported project
  4. The result is a self-contained project with proper styling

Utilities

(Add details about any utility functions or components provided by this package if applicable)