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

monochrome

v0.3.0

Published

Accessible UI component library. Best-in-class performance. HTML-first, React and Vue supported.

Readme

Monochrome

Accessible UI component library. Best-in-class performance. HTML-first, React and Vue supported.

gzip tests WCAG license

Install

npm install monochrome
import "monochrome"                               // Core (auto-activates)
import { Accordion } from "monochrome/react"       // React
import { Accordion } from "monochrome/vue"         // Vue

Usage

import "monochrome"
import { Accordion } from "monochrome/react"

export function FAQ() {
  return (
    <Accordion.Root type="single">
      <Accordion.Item>
        <Accordion.Header>
          <Accordion.Trigger>What is monochrome?</Accordion.Trigger>
        </Accordion.Header>
        <Accordion.Panel>
          <p>A tiny, accessible UI component library.</p>
        </Accordion.Panel>
      </Accordion.Item>
    </Accordion.Root>
  )
}

Import "monochrome" once at your app's entry point. The wrappers generate the correct HTML structure and ARIA attributes. All interactivity comes from the Monochrome runtime - no framework JavaScript needed on the client.

The Vue API is identical: import { Accordion } from "monochrome/vue". Monochrome also works with plain HTML or any framework that outputs HTML. See AGENTS.md for full documentation.

Components

Four interactive UI patterns in 2.2kB:

| Component | Description | Tests | | --- | --- | ---: | | Accordion | Grouped collapsible content sections | 66 | | Collapsible | Show and hide content with a button | 42 | | Menu | Dropdown menus, menubars, and submenus | 176 | | Tabs | Switch between multiple content panels | 70 |

How it works

Monochrome uses the DOM as its source of truth. Instead of managing state in JavaScript, it reads ARIA attributes, responds to user interactions, and updates them directly. Minimal global event listeners handle every component on the page through event delegation. No initialization, no configuration, no framework required.

Accessibility

Every component follows WAI-ARIA Authoring Practices and targets WCAG 2.2 AA:

  • Full keyboard navigation (Arrow keys, Home, End, Enter, Space, Escape)
  • Roving tabindex for focus management
  • Automatic ARIA attribute management
  • Preserves browser find-in-page (cmd+f)
  • Screen reader support out of the box

Styling

Monochrome is headless - no CSS is shipped. You provide all styles. Key requirements for menus:

[popover]:popover-open {
  display: flex;
}

[role="menu"] {
  position: fixed;
  top: var(--bottom);
  left: var(--left);
}

[role="menu"] [role="menu"] {
  top: var(--top);
  left: var(--right);
}

Browser Requirements

The core depends on Popover API and hidden="until-found" (Baseline 2024). All modern browsers are supported.

License

MIT © Colin van Eenige