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

@tuanlee-tech/tsm-ui

v1.0.5

Published

Modern, customizable React UI component library built with Rollup

Readme

🧩 @tuanlee-tech/tsm-ui

npm version npm downloads license bundle size

@tuanlee-tech/tsm-ui is a lightweight React UI component library built for modern apps — beautiful, minimal, and fully customizable with your own theme.

🌐 Live Demo: https://tuanlee-tech.github.io/tsm-ui-library/


🚀 Features

  • Lightweight & Tree-shakable — built with Rollup for optimal performance
  • 🎨 Customizable Theme System — easily change colors, spacings, borders, etc.
  • 💅 Scoped CSS with CSS Variables — simple global styling via global.css
  • 🧱 Composable Components — flexible and reusable
  • 🧰 Framework Compatible — works perfectly with Vite, CRA, Next.js, and more

📦 Installation

npm install @tuanlee-tech/tsm-ui
# or
yarn add @tuanlee-tech/tsm-ui
# or
pnpm add @tuanlee-tech/tsm-ui

🧩 Components List

| Component | Description | | ------------ | ------------------------------------------------------------------- | | Button | Reusable button with multiple variants (primary, outline, etc.) | | Input | Simple and accessible input field | | Select | Dropdown select with styling | | Checkbox | Styled checkbox component | | Switch | Toggle switch for boolean states | | Card | Wrapper with shadow and padding | | Modal | Overlay dialog with content | | Tooltip | Hover-based tooltip with animation |


🎨 Theming & Custom Styles

TSM-UI uses a unified theme system powered by JavaScript theme objects and CSS variables.

You can customize the look of all components in two ways:


1️⃣ Edit theme.js (for forked or local builds)

// ==================== src/ui/theme.js ====================

export const theme = {
  colors: {
    primary: "#00D9FF",
    background: "#0a0e1a",
    text: "#e4e4e7",
    // ...other tokens
  },
  spacing: {
    sm: "8px",
    md: "12px",
    lg: "16px",
  },
  borderRadius: {
    md: "8px",
    lg: "12px",
  },
  shadows: {
    sm: "0 2px 8px rgba(0, 0, 0, 0.2)",
  },
};

If you fork the repo or use the source directly, you can edit theme.js and rebuild.


2️⃣ Override CSS Variables (Recommended)

All theme tokens are mapped to CSS variables automatically. You can redefine them anywhere in your app — the most flexible and common approach.

✅ Example: src/theme.css
/* ==================== src/theme.css ==================== */
/* Override default colors of TSM-UI */

:root {
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-background: #0b1120;
  --color-background-light: #1e1b4b;
  --color-background-lighter: #312e81;
  --color-border: #4338ca;
  --color-border-light: #6366f1;
  --color-text: #f1f5f9;
  --color-text-secondary: #c7d2fe;
  --color-text-muted: #a5b4fc;
  --color-error: #f43f5e;
  --color-success: #10b981;
  --color-warning: #fbbf24;
}

body {
  background: var(--color-background);
  color: var(--color-text);
  transition: background 0.3s ease, color 0.3s ease;
}
✅ Import in your entry file (e.g. main.jsx)
import "@tuanlee-tech/tsm-ui/dist/index.css"; // Base library styles
import "./theme.css"; // ✅ Custom overrides (must come AFTER)

🧠 Tip: Always import your custom theme file after the library CSS to ensure your colors take effect.


🌗 Optional: Dynamic Dark/Light Mode

You can define multiple themes and switch between them dynamically.

:root[data-theme="dark"] {
  --color-background: #0b1120;
  --color-primary: #6366f1;
}

:root[data-theme="light"] {
  --color-background: #ffffff;
  --color-primary: #2563eb;
  --color-text: #111827;
}

Then toggle via JavaScript:

document.documentElement.setAttribute("data-theme", "dark");

🏗️ Folder Structure

tsm-ui/
├── src/
│   ├── components/
│   │   ├── Button/
│   │   ├── Input/
│   │   ├── Select/
│   │   ├── Checkbox/
│   │   ├── Switch/
│   │   ├── Card/
│   │   ├── Modal/
│   │   └── Tooltip/
│   ├── ui/
│   │   ├── theme.js
│   │   └── global.css
│   └── index.js          # Export all components
├── dist/                 # Build output
├── rollup.config.js
├── package.json
└── README.md

⚙️ Development & Build

Install dependencies

npm install

Build the library

npm run build

Watch mode (auto rebuild on save)

npm run watch

🧾 License

MIT © 2025 — Built with ❤️ by Tuan Lee


🌐 Links