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

htmx-ui

v0.3.0

Published

Tailwind CSS v4 components for htmx apps: plain HTML, themeable with CSS variables, dark mode built in.

Readme

htmx-ui

Tailwind CSS v4 components for htmx apps. Plain HTML and CSS classes, a few small behaviours that keep working inside htmx-swapped fragments, design tokens for theming, and dark mode built in.

<button class="btn btn-primary" hx-post="/save" hx-target="#result">Save</button>
<div class="alert alert-success" role="status">
  <div class="alert-title">Saved</div>
</div>

Install

bun add htmx-ui htmx.org
bun add -D tailwindcss

(or npm install, pnpm add, yarn add). Requires Tailwind CSS v4 and htmx 4.

Use

/* your stylesheet */
@import "tailwindcss";
@import "htmx-ui/styles.css";
// your entry script
import "htmx.org";
import { initComponents } from "htmx-ui";
import { initTheme } from "htmx-ui/theme";

document.addEventListener("DOMContentLoaded", () => {
  initTheme();
  initComponents(document);
});
// htmx 4 fires htmx:after:process on each newly inserted element
document.addEventListener("htmx:after:process", (e) => initComponents(e.target ?? document));

| Import | Contents | | :--- | :--- | | htmx-ui | initComponents(root): wires up component behaviour under root | | htmx-ui/styles.css | Design tokens, dark mode, .prose and every component's styles | | htmx-ui/theme | initTheme(), getTheme(): light/dark switcher | | htmx-ui/icons/<name>.svg | SVG icons | | htmx-ui/components/<name>/<name>.html | Nunjucks macros (icon, code, alert, spinner) for htmx-ui-engine sites |

Theme it by overriding CSS variables:

:root      { --primary: oklch(0.6 0.2 30); --radius: 0.75rem; }
:root.dark { --primary: oklch(0.7 0.17 30); }

Starting a new site? bun create htmx-ui@latest (or npm create, pnpm create, yarn create) sets up pages, layouts, Tailwind and a dev server with htmx-ui-engine.

Full documentation, with live examples, theming and dark mode guides, is on the docs site. Every docs page is also available as Markdown for AI agents (/docs/<page>.md, /llms.txt).

License

MIT. Release notes: CHANGELOG.md.