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

42-components

v0.0.2

Published

Headless UI component library (vanilla TypeScript) with optional theme.

Readme

@42-components

Headless UI component library in vanilla TypeScript, with optional theme.

Packages

| Package | Description | | --- | --- | | @42/core | Framework-agnostic headless controllers (subpath exports per component). | | @42/styles | Optional theme (CSS custom properties, dark mode included). |

Components

Grouped by what you are trying to do. Full per-component reference (markup, options, events) lives in docs/llm/reference/; complex components have a deep dive in docs/llm/.

| Category | Use it when… | Reference | | --- | --- | --- | | Inputs & Forms | you capture data from the user | inputs.md | | Overlays | you need a transient layer above content | overlays.md | | Navigation | you move around or structure a flow | navigation.md | | Data & Collections | you display or manipulate sets of data | data.md | | Media | you show images or people | media.md | | Feedback & Status | you communicate state, progress or an action | feedback.md | | Disclosure & Layout | you show or hide regions of content | disclosure.md | | Presentational (CSS-only) | you just need styles, no controller | presentational.md |

Development

pnpm install
pnpm test            # vitest (jsdom)
pnpm build           # build all publishable packages
pnpm storybook       # run Storybook (HTML + Vite)

Usage

npm install @42/core @42/styles
<div data-c42-accordion>
  <div data-c42-accordion-item data-value="a">
    <button data-c42-accordion-trigger>Title</button>
    <div data-c42-accordion-panel>Content</div>
  </div>
</div>
import { Accordion } from '@42/core/accordion';
import '@42/styles/accordion.css'; // optional theme

const acc = new Accordion(document.querySelector('[data-c42-accordion]')!, { multiple: false });
acc.on('accordion:change', (e) => console.log(e.detail.value));

Form validation

The Form controller turns native inputs into a validated, accessible form (ARIA wiring, error states, typed events) without imposing styles:

<form data-c42-form>
  <div data-c42-field>
    <label for="email">Email</label>
    <input id="email" name="email" type="email" data-c42-validate="required email" />
    <span data-c42-field-error hidden></span>
  </div>
  <button type="submit">Sign up</button>
</form>
import { Form } from '@42/core/form';
import '@42/styles/form.css'; // optional theme

const form = new Form(document.querySelector('[data-c42-form]')!, { mode: 'blur' });
form.on('form:submit', (e) => console.log(e.detail.values)); // only fires when valid
form.on('form:invalid', (e) => console.log(e.detail.errors));

See docs/llm/form.md for rules, options and recipes.

Theming

Import @42/styles for the complete theme. Customize by overriding primitives:

:root {
  --c42-primary-500: #0ea5e9;
  --c42-primary-600: #0284c7;
}

Dark mode activates automatically via prefers-color-scheme or with data-theme="dark" on <html>.

The full theme also applies a thin, subtle global scrollbar (tunable via --c42-scrollbar-size / --c42-scrollbar-thumb / --c42-scrollbar-thumb-hover, or import @42/styles/scrollbar.css standalone).

AI agents

See LLM.md for the complete component reference optimized for AI consumption.