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

htm-ts

v0.0.4

Published

Surgically reactive, type-safe tagged template engine with signals and fine-grained updates.

Readme

htm-ts

htm-ts is a Surgically Reactive UI Runtime that brings JSX-like ergonomics to plain JavaScript using Tagged Templates.

It is a modern, strongly-typed fork of developit/htm, replacing the Virtual DOM approach with a Fine-Grained Reactive Engine powered by Signals.


⚖️ How it Compares: htm vs. htm-ts

| Feature | Original htm | htm-ts | | :--- | :--- | :--- | | Primary Output | Static VNode Objects | Reactive DOM Instructions | | Reactivity | External (React/Preact) | Built-in Signals & Effects | | Update Strategy | VDOM Diffing (Top-down) | Surgical (Direct DOM updates) | | Performance | O(VNodes) | O(Changes) | | Build Step | Optional | Zero (Native ESM) | | Size | ~600b (Parser only) | ~2.6KB (Full Runtime) |


✅ What Accomplished

  1. Surgical Reactivity
    Built a runtime where a Signal change bypasses the "Component Function." If a count signal updates, htm-ts targets the exact text node or attribute in the DOM. No reconciliation, no diffing.

  2. The 2.6KB Runtime
    Packed a full HTML parser, a Signal system, an Effect tracker, and a DOM renderer into a package

  3. The Type-Safe Chassis
    Implemented a tail-recursive type-level parser. It ensures that your template structure is valid and that your Signal-to-Attribute bindings are typed.

  4. Zero-Tooling DX
    No Babel, no Vite plugins, no decorators. It runs natively in any modern browser using standard ES Modules.

  5. Expression Anchoring
    Expression Anchoring (Prop Safety) Solved the "Function Tag" type-inference problem. Using the p() helper, component props are strictly validated by TypeScript, preventing runtime errors before they happen.


⚠️ What it is NOT

  • It is NOT a Compiler: htm-ts parses templates at runtime. This allows for zero-build usage but means we don't have a "pre-compile" step to optimize the strings.
  • It is NOT an IDE Plugin: due to TypeScript's current limitation with Tagged Template hole-inference, your IDE will not show red squiggles for a typo like <divv> inside a template that contains variables.
  • It is NOT a Framework: htm-ts is just a focused, high-performance UI primitive.

🛠 Usage

import { html, render, signal, p } from 'htm-ts';

const [count, setCount] = signal(0);

// Props are strictly typed const Display = ({ value }) => html<span>Value is: ${value}</span>;

const App = () => html`

<${Display} ${p({ value: count() })} />

render(App(), document.body);

🏁 Installation

pnpm add htm-ts

Or using npm:

npm install htm-ts

Open in StackBlitz