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

plain-elements

v0.1.1

Published

Unstyled, accessible UI primitives as framework-agnostic Web Components. Light DOM and progressive enhancement, styled with your own CSS.

Readme

Plain Elements

Unstyled, accessible UI primitives delivered as framework-agnostic Web Components.

Plain Elements adds behavior — not markup or styling — to the HTML you already write. Each component is a Custom Element that operates in the Light DOM (no Shadow DOM) and follows progressive enhancement: it handles lifecycle, listeners, observers, and state synchronization, while you keep full control of your DOM structure and CSS.

  • Styleless — you style everything with your own CSS. No design opinions ship with the library.
  • Accessible — native semantics, ARIA, keyboard interaction, and focus management are handled for you.
  • Native-first — built on platform APIs (<dialog>, the Popover API, <details>/<summary>) instead of reimplementing them.
  • Framework-agnostic — plain custom elements, usable with any framework or none.

Documentation: https://plain-elements.com/

Components

| Component | Element | Description | |-----------|---------|-------------| | Dialog | <pe-dialog> | Modal behavior over a native <dialog> (dismiss, forms, events). | | Popover | <pe-popover> | Interactive non-modal popup using the native Popover API. | | Tooltip | <pe-tooltip> | Hover/focus tooltip with sides, alignment, and delays. | | Tabs | <pe-tabs> | Tab list with keyboard navigation and activation modes. | | Accordion | <pe-accordion> | Native disclosure behavior with optional managed animation. | | Collapsible | <pe-collapsible> | Independent disclosure region for a single panel. |

Installation

npm install plain-elements

Or build from source:

npm ci
npm run build

The build produces ES modules and an IIFE bundle in dist/. For static HTML or CMS pages, copy the IIFE build to your assets folder and load it with a script tag:

<script src="/assets/plain-elements.iife.js" defer></script>

Place the script in <head> with defer, or before </body>. Both avoid parser-blocking and work with authored markup in the page body.

Usage

Importing the package registers every custom element:

import "plain-elements";

Or register only the components you need via subpath imports:

import "plain-elements/dialog";
import "plain-elements/popover";
import "plain-elements/tooltip";
import "plain-elements/tabs";
import "plain-elements/accordion";
import "plain-elements/collapsible";

Enhance your existing markup — for example, a collapsible region:

<pe-collapsible>
  <button type="button" data-collapsible-trigger>Details</button>
  <div data-collapsible-panel>Additional details.</div>
</pe-collapsible>

Hosts use display: contents so they do not affect layout. Style the native elements and your own controls directly:

pe-dialog,
pe-popover,
pe-tabs,
pe-accordion,
pe-collapsible,
pe-tooltip {
  display: contents;
}

See the Quick start guide for the anatomy of each component.

Development

npm ci                 # install pinned dependencies
npm run dev            # start the demo dev server
npm test               # run browser tests (Vitest + Playwright Chromium)
npm run typecheck      # TypeScript strict type checking
npm run build          # build ESM, IIFE, and type definitions

Playwright's Chromium is required for the tests. Install it once with:

npx playwright install chromium

License

MIT © k-s-h-r