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

@agencecinq/combobox

v1.0.3

Published

Accessible editable combobox with list autocomplete as a lightweight Web Component.

Readme

@agencecinq/combobox

Accessible editable combobox with list autocomplete as a lightweight Web Component (<cinq-combobox>), aligned with the WAI-ARIA Authoring Practices combobox pattern.

Inspired by @19h47/combobox.

HTML is the source of truth for roles and structure. The component does not invent missing attributes — you deliver clean markup; it orchestrates keyboard behaviour, popup visibility, and ARIA state.

Install

pnpm add @agencecinq/combobox

Usage

import "@agencecinq/combobox";

const host = document.querySelector("cinq-combobox");

host.search = (value) => {
  if (value.length < 1) return monsters;
  return monsters.filter((name) =>
    name.toLowerCase().startsWith(value.toLowerCase()),
  );
};
<label for="monster">Monster</label>
<cinq-combobox>
  <input
    id="monster"
    type="text"
    role="combobox"
    aria-autocomplete="list"
    aria-expanded="false"
    aria-controls="monster-listbox"
    autocomplete="off"
  />
  <button
    type="button"
    tabindex="-1"
    aria-label="Monsters"
    aria-controls="monster-listbox"
    aria-expanded="false"
  >
    ▼
  </button>
  <ul id="monster-listbox" role="listbox" aria-label="Monsters" hidden></ul>
</cinq-combobox>

Assign search after the element is in the DOM (or before — mounting waits for both connectedCallback and a search function).

Set the textbox from outside via the host attribute or property:

<cinq-combobox value="Owlbear">…</cinq-combobox>
host.value = "Owlbear";
host.setValue("Owlbear");
host.setAttribute("value", "Owlbear");

Events

Dispatched on the host <cinq-combobox> (bubble). Constants live on @agencecinq/utils EVENTS:

| Event | Constant | Detail | | ----- | -------- | ------ | | combobox:loading | COMBOBOX_LOADING | — | | combobox:loaded | COMBOBOX_LOADED | — | | combobox:update | COMBOBOX_UPDATE | { options, index, value } | | combobox:submit | COMBOBOX_SUBMIT | { option, index, value } | | combobox:empty | COMBOBOX_EMPTY | { value } |

import { EVENTS } from "@agencecinq/utils";

host.addEventListener(EVENTS.COMBOBOX_SUBMIT, ({ detail }) => {
  console.log(detail.option, detail.value);
});

Styling hooks

| Hook | Element | When | | ---- | ------- | ---- | | [hidden] | listbox | Popup closed | | [aria-expanded="true"] | input / button | Popup open | | [aria-busy="true"] | listbox | Search in flight | | [expanded] / [busy] / [disabled] | host | Mirrored state |