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

@sehgaltech/psui

v1.0.5

Published

A scalable and customizable UI library built with Tailwind CSS v4, TypeScript, and React

Readme

PSUI

A scalable and customizable UI library built with Tailwind CSS v4, TypeScript, and React.

📚 Documentation | 📝 Changelog

Features

  • 🎨 Tailwind CSS v4 - Modern CSS-first configuration with @theme blocks
  • 📦 TypeScript - Full type safety and excellent developer experience
  • tsup - Fast and efficient builds with ESM/CJS dual output
  • 📚 Documentation - Custom interactive component documentation using Vite
  • 🧪 Vitest - Fast unit testing with React Testing Library
  • 🎯 Tree-shakeable - Optimized bundle size with side-effect free exports
  • 🎨 Customizable - Easy theme customization via CSS variables

Installation

npm install @sehgaltech/psui
# or
yarn add @sehgaltech/psui
# or
pnpm add @sehgaltech/psui

Usage

Basic Setup

  1. Import the library styles in your application's main CSS file or entry point:
// In your main CSS file (e.g., index.css or app.css)
@import '@sehgaltech/psui/styles';

OR in your JavaScript/TypeScript entry file:

// In your main entry file (e.g., main.tsx or index.tsx)
import './index.css'; // This initializes Tailwind and scans psui
import '@sehgaltech/psui/styles'; // This provides the colors/themes for psui

Note: Make sure your build tool supports Tailwind CSS v4. If you're using Vite, install @tailwindcss/vite plugin:

npm install -D @tailwindcss/vite

Then add it to your vite.config.ts:

import tailwindcss from '@tailwindcss/vite';

export default {
  plugins: [tailwindcss()],
};
  1. Use components in your React application:
import { Button } from '@sehgaltech/psui';

function App() {
  return (
    <div>
      <Button variant="solid" type="primary" size="md">
        Click me
      </Button>
    </div>
  );
}

Button Component

The Button component supports multiple types, variants, sizes, and states:

import { Button } from '@sehgaltech/psui';

// Types (colors)
<Button type="primary">Primary</Button>
<Button type="secondary">Secondary</Button>
<Button type="success">Success</Button>
<Button type="danger">Danger</Button>
<Button type="warning">Warning</Button>
<Button type="info">Info</Button>
<Button type="ghost">Ghost</Button>

// Variants (styles)
<Button variant="solid">Solid (default)</Button>
<Button variant="outlined">Outlined</Button>
<Button variant="dashed">Dashed</Button>
<Button variant="text">Text</Button>
<Button variant="link">Link</Button>

// Sizes
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>

// States & Features
<Button loading>Loading...</Button>
<Button disabled>Disabled</Button>
<Button fullWidth>Full Width</Button>
<Button success>Success State</Button>
<Button startIcon={<YourIcon />}>With Icon</Button>

Themes

PSUI ships with two themes: Winter (light) and Starlight (dark). Both use OKLCH colors and semantic tokens (base, primary, secondary, accent, neutral, info, success, warning, error).

Switching themes

Set data-theme on a root element (e.g. <html> or a wrapper):

// Light (default)
<html data-theme="winter">

// Dark
<html data-theme="starlight">

You can switch at runtime:

document.documentElement.setAttribute('data-theme', 'starlight');

Theme tokens

  • Colors: base-100, base-200, base-300, base-content, primary, primary-content, secondary, secondary-content, accent, accent-content, neutral, neutral-content, info, info-content, success, success-content, warning, warning-content, error, error-content
  • Radius: --radius-selector, --radius-field, --radius-box
  • Sizes: --size-selector, --size-field
  • Border: --border-width

Customization

Override theme variables for a given theme:

[data-theme="winter"] {
  --theme-primary: oklch(70% 0.12 260);
}

Development

Prerequisites

  • Node.js 18+
  • npm, yarn, or pnpm

Setup

# Install dependencies
npm install

# Start development build in watch mode
npm run dev

# Run documentation site locally
cd docs && npm run dev

# Run tests
npm test

# Type check
npm run type-check

# Build library
npm run build

Project Structure

psui/
├── src/
│   ├── components/       # React components
│   │   ├── Button/
│   │   └── index.ts
│   ├── styles/           # Tailwind CSS styles
│   │   ├── base.css      # Tailwind import
│   │   └── theme.css     # Theme tokens
│   ├── types/            # TypeScript types
│   ├── utils/            # Shared utilities
│   └── index.ts          # Main entry point
├── docs/                 # Custom Vite React documentation site
└── dist/                 # Build output

Adding New Components

  1. Create component directory in src/components/:
mkdir src/components/MyComponent
  1. Create component file:
// src/components/MyComponent/MyComponent.tsx
import { forwardRef } from 'react';
import type { ComponentProps } from '../../types';

export interface MyComponentProps extends ComponentProps<'div'> {
  // Your props
}

export const MyComponent = forwardRef<HTMLDivElement, MyComponentProps>(
  ({ className, ...props }, ref) => {
    return <div ref={ref} className={className} {...props} />;
  }
);

MyComponent.displayName = 'MyComponent';
  1. Export from component index:
// src/components/MyComponent/index.ts
export { MyComponent } from './MyComponent';
export type { MyComponentProps } from './MyComponent';
  1. Export from main components index:
// src/components/index.ts
export { MyComponent } from './MyComponent';
export type { MyComponentProps } from './MyComponent';
  1. Export from main library entry:
// src/index.ts
export { MyComponent } from './components';
export type { MyComponentProps } from './components';
  1. Create a documentation page in docs/src/pages/MyComponentPage.tsx and add it to the routing in docs/src/App.tsx.

Building and Publishing

Build

npm run build

This generates:

  • dist/index.js - CommonJS bundle
  • dist/index.mjs - ES Module bundle
  • dist/index.d.ts - TypeScript declarations
  • dist/styles.css - Compiled CSS

Publishing

  1. Update version in package.json
  2. Build the library: npm run build
  3. Publish to npm: npm publish

Deployment (Documentation)

Deploy the custom component documentation site (docs/) to Vercel so others can browse the library online.

Prerequisites

  • Project pushed to GitHub, GitLab, or Bitbucket
  • Vercel account

Steps

  1. Deploy via Vercel
  • In Vercel: Add New Project → import your repository.
  • Configure the project:
    • Framework Preset: Vite
    • Root Directory: docs
    • Build Command: npm run build
    • Output Directory: dist
    • Install Command: npm install
  • Deploy. The published URL will serve your custom Vite React documentation site.

TypeScript Support

PSUI is written in TypeScript and provides full type definitions. All components export their prop types for use in your applications:

import type { ButtonProps } from '@sehgaltech/psui';

const MyButton: React.FC<ButtonProps> = (props) => {
  // Type-safe component
};

Browser Support

  • Safari 16.4+
  • Chrome 111+
  • Firefox 128+

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.