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

htmldocs-v2

v0.4.11

Published

<h1 align="center"> <img src="https://github.com/user-attachments/assets/655fa7f9-98e7-42ee-8cd0-bb9193f100e9" alt="htmldocs" width="100%" /> </h1>

Readme

🚀 Active Development: htmldocs is under continuous improvement with frequent updates and performance optimizations. Recent release achieved 8-12x faster hot reload!

PDF document creation is stuck in the past, from clunky Word docs to complex LaTeX to outdated tools. htmldocs brings document generation into 2025 with a modern developer experience using the tools you already love: React, TypeScript, and Tailwind.

📊 Project Status

This package is in active development with a focus on:

  • ⚡ Performance optimization (recent: 8-12x faster hot reload)
  • 🐛 Bug fixes and stability improvements
  • ✨ New features based on community feedback
  • 📦 Regular NPM releases

Latest (v0.4.10): Incremental build optimization, 3-layer caching, 2-4s hot reload

What is htmldocs?

htmldocs is a local document editor and preview server to help you create PDFs with React. It provides all the structural benefits of LaTeX with the familiarity of HTML and CSS. With htmldocs, you can use JSX to build document templates (invoices, reports, contracts, etc.) and generate PDFs just by passing data as props. htmldocs has:

  • 📌 Support for the latest CSS features like margin boxes and flexbox
  • 🧩 A collection of unstyled components to help you layout your documents
  • 📄 JSX templating system for building dynamic documents
  • 🔗 Full TypeScript support for type safety
  • ⚡ Dynamic data integration through props and APIs
  • 📊 Real-time preview server with hot reloading

Example

To see the full power of htmldocs, here is how you might build a dynamic invoice document template with JSX template variables:

To change the customer details, all you need to do is render the Invoice component with different props:

<Invoice
  customer={{
    name: "John Doe",
    address: "456 Main St",
    city: "Anytown",
    state: "CA",
    zip: "12345",
    phone: "123-456-7890",
  }}
  items={items}
/>

Screenshots

Resume example

Variables editor

Install

To create your first htmldocs project, run the following command:

npx htmldocs-v2@latest init

For further instructions or to integrate htmldocs into your existing project, refer to the Getting Started guide.

Components

htmldocs comes with a standard set of components to help you layout and style your documents.

How it works

htmldocs is built upon Chromium's rendering engine, which means it can render any HTML, CSS, and JavaScript. This is different from other tools like wkhtmltopdf, WeasyPrint, and Prince, which only support a subset of HTML and CSS.

htmldocs also uses the Paged.js library under the hood. Paged.js is used for layout and chunking, as well as more modern features like margin boxes that aren't fully supported by the W3C's CSS standard.

💚 Developer Experience

Lightning-fast development workflow:

  • First document load: ~32s (builds context)
  • Edit and see changes: 2-4s
  • 10 edits: ~1 minute (vs 5+ minutes in other tools)

Smart caching across:

  • ✅ esbuild incremental builds
  • ✅ React component rendering
  • ✅ Tailwind CSS generation

htmldocs provides a modern development experience with hot reload that's 8-12x faster than traditional approaches. Work on your documents with near-instant feedback.

Tech Stack

| | | | | | ------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | Next.js | TypeScript | Turborepo | pnpm |

License

MIT License