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

simple-master-ui

v0.1.0

Published

A component library for Master CSS — pure HTML classes, no JS, dark/light theme support.

Readme

Simple Master UI

A TypeScript-first component library for Master CSS — pure HTML class names, zero JavaScript, built-in dark/light theme support. Inspired by DaisyUI.


Features

  • 25+ components — buttons, cards, inputs, alerts, tables, avatars, and more
  • 🌗 Dark/light themes — automatic via CSS variables and data-theme attribute
  • 🚫 Zero JS — styles only, works with any stack or plain HTML
  • 📦 NPM ready — fully typed, ships .d.ts files
  • 🎨 Fully customizable — override any token or component variant with type safety

Installation

npm install simple-master-ui @master/css

Usage

With Master CSS v1 (Style.extend)

import { Style } from '@master/css'
import { buildConfig, injectTokens } from 'simple-master-ui'

const config = buildConfig()

// Register all component classes
Style.extend('classes', config.classes)

// Inject CSS variable tokens into the document
injectTokens(config)

Extend with your own tokens and components

import { Style } from '@master/css'
import { extend, injectTokens } from 'simple-master-ui'

const config = extend({
  tokens: {
    // Override primary color for light and dark
    '--color-primary': { '@light': '#e11d48', '@dark': '#fb7185' },
    // Override a radius
    '--radius-md': '0.75rem',
  },
  components: {
    // Add a new variant to btn
    btn: {
      brand: 'btn bg:red-50! fg:white! font:bold',
    },
    // Completely override a component
    card: {
      '': 'flex flex:col bg:white r:12 shadow:lg b:1|solid|gray-20',
      body: 'p:8x flex flex:col gap:5',
    },
  },
})

Style.extend('classes', config.classes)
injectTokens(config)

CDN / Plain HTML (no build step)

<html data-theme="light">
<head>
  <!-- Inject tokens via style tag -->
  <style id="smu-tokens">
    :root {
      --color-primary: #4f46e5;
      --color-base: #ffffff;
      /* … see dist/index.js for all tokens … */
    }
    [data-theme="dark"] {
      --color-primary: #818cf8;
      --color-base: #0f172a;
    }
  </style>
  <script src="https://cdn.master.co/css@1"></script>
  <script>
    // Register classes via the global Style object
    MasterStyleSheet.extend?.('classes', { /* paste config.classes here */ })
  </script>
</head>

Theme Toggle

<html data-theme="light">
// Toggle dark mode
document.documentElement.setAttribute('data-theme', 'dark')

// Read current theme
const isDark = document.documentElement.getAttribute('data-theme') === 'dark'

API

buildConfig(tokens?, components?): SMUConfig

Build a config from fully resolved tokens and components.

import { buildConfig, defaultTokens, defaultComponents } from 'simple-master-ui'

const config = buildConfig(defaultTokens, defaultComponents)
// config.classes  — flat Record<string, string> for Style.extend
// config.tokens   — resolved SMUTokens
// config.rootCSS  — :root { … } string
// config.darkCSS  — [data-theme="dark"] { … } string

extend(options): SMUConfig

Merge your overrides on top of the defaults.

import { extend } from 'simple-master-ui'

const config = extend({
  tokens: { '--color-primary': '#ff0000' },
  components: { btn: { danger: 'btn bg:red-50! fg:white!' } },
})

injectTokens(config?): void

Inject CSS token variables into document.head. Safe to call multiple times.

import { injectTokens } from 'simple-master-ui'
injectTokens()              // uses default config
injectTokens(customConfig)  // uses your config

buildRootCSS(tokens): string / buildDarkCSS(tokens): string

Generate raw CSS strings (useful for SSR).

import { buildRootCSS, buildDarkCSS, defaultTokens } from 'simple-master-ui'

const html = `
  <style>
    ${buildRootCSS(defaultTokens)}
    ${buildDarkCSS(defaultTokens)}
  </style>
`

Components

| Component | Base class | Variants example | |---------------|-----------------|-------------------------------------------| | Button | btn | btn-primary, btn-sm, btn-outline, btn-circle | | Badge | badge | badge-success, badge-lg, badge-outline | | Card | card | card-body, card-title, card-bordered | | Input | input | input-sm, input-error, input-ghost | | Select | select | select-sm, select-lg | | Textarea | textarea | — | | Alert | alert | alert-info, alert-success, alert-error | | Avatar | avatar | avatar-md, avatar-placeholder, avatar-ring | | Navbar | navbar | navbar-brand, navbar-item, navbar-item-active | | Menu | menu | menu-item, menu-item-active, menu-title | | Tabs | tabs | tabs-tab, tabs-tab-active, tabs-boxed | | Table | table | table-th, table-td, table-row, table-wrapper | | Modal | modal | modal-box, modal-title, modal-actions | | Drawer | drawer | drawer-overlay, drawer-header, drawer-body | | Progress | progress | progress-bar, progress-success, progress-lg | | Skeleton | skeleton | skeleton-text, skeleton-circle | | Loading | loading | loading-sm, loading-md, loading-lg | | Tooltip | tooltip | tooltip-text, tooltip-show | | Dropdown | dropdown | dropdown-menu, dropdown-item, dropdown-divider | | Breadcrumb | breadcrumb | breadcrumb-item, breadcrumb-link | | Pagination | pagination | pagination-item, pagination-active | | Stat | stat | stat-title, stat-value, stat-desc | | Accordion | accordion | accordion-item, accordion-trigger | | Toast | toast | toast-item, toast-success, toast-error | | Chip | chip | chip-primary, chip-error | | Divider | divider | divider-line, divider-label | | Code | code | code-block | | Steps | steps | steps-step, steps-bullet-active | | Hero | hero | hero-body, hero-title, hero-sub | | Form Group | form-group | form-group-label, form-group-error | | Container | container | — |


Design Tokens

All tokens map to CSS custom properties. Override via extend({ tokens: { … } }):

| Token | Light default | Dark default | |------------------------|---------------|--------------| | --color-primary | #4f46e5 | #818cf8 | | --color-secondary | #0ea5e9 | #38bdf8 | | --color-accent | #f59e0b | #fbbf24 | | --color-success | #22c55e | #4ade80 | | --color-warning | #f59e0b | #fbbf24 | | --color-error | #ef4444 | #f87171 | | --color-base | #ffffff | #0f172a | | --color-content | #0f172a | #f1f5f9 | | --color-border | #e2e8f0 | #334155 | | --radius-md | 0.5rem | 0.5rem | | --shadow-md | 0 4px 6px … | same |


TypeScript

All exports are fully typed. Key types:

import type {
  SMUConfig,        // output of buildConfig() / extend()
  SMUTokens,        // all design token keys
  SMUExtendOptions, // input to extend()
  ComponentMap,     // { '': string, primary: string, … }
  ComponentsMap,    // { btn: ComponentMap, card: ComponentMap, … }
} from 'simple-master-ui'

License

MIT © Simple Master UI Contributors