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

@nifrajs/web-vanilla

v5.18.1

Published

Zero-framework render adapter for @nifrajs/web - auto-escaping tagged-template HTML, ~0 KB client JS, interactivity via @nifrajs/web/islands.

Readme

@nifrajs/web-vanilla

Zero-framework render adapter for @nifrajs/web - auto-escaping tagged-template HTML, ~0 KB client JS, interactivity via @nifrajs/web/islands.

Part of the nifra full-stack TypeScript framework - one core, five UI libraries, every runtime. Scaffold a new app with bun create nifra.

The AI-safe lane

Vanilla is the render adapter an agent gets right on the first try. It ships no framework runtime, so there is no hydration, no reactivity, and none of the failure modes (stale closures, hydration mismatch, what-re-runs-when) that trip up generated code. You get true SSR plus every server feature - loaders, actions, ISR/SSG, streaming, head management - unchanged from @nifrajs/web; those live in the core, not the view layer.

Interactivity is added with islands, not hydration: small imperative DOM enhancers over server-rendered elements. defineIsland types the props, createIslandBus coordinates islands over a typed channel, and every enhancer returns its cleanup - the one rule nifra check enforces (NF-C020). See the islands cookbook for the counter, cart-badge, and filter patterns, or run nifra scaffold on a vanilla route for the golden stub.

To refresh one region from a link or GET form without a full reload, render it with slot(name, content) inside a data-swap-slot="<name>" element and mark the link or form data-swap="replace:<name>" or "append:<name>"; the page then answers a swap request with that slot alone, and enableSwap from @nifrajs/web/islands/swap puts it in place. POST forms submit natively, and a swapped slot runs under the current page's Content-Security-Policy. See Refresh part of the page.

Escaping

html writes each interpolated value for the place it lands, read from the template's own text:

  • In text and in a quoted attribute value, it is HTML-escaped.
  • An unquoted attribute value (class=${name}) is quoted for you, so a space in the value cannot start another attribute.
  • A javascript: or vbscript: URL that begins an href, src, action or other URL attribute is written as about:invalid. So is a data: URL that begins the src (or href) of a <script>, which runs; a data: image, download, frame or object URL is kept.
  • No escaping makes a string safe as a tag name, inside <script> or <style>, or in an on* handler or srcdoc value, so a string or nested template throws there. An attribute name takes only a plain name with no value (<input ${checked ? "checked" : ""}>), or a suffix after data- or aria-. Numbers and booleans fill any of these, and raw() is the explicit opt-out for trusted text.

Need a stateful app UI with reactive components? That is what the five framework adapters are for - reach for @nifrajs/web-preact or @nifrajs/web-solid when you want a small reactive runtime.

Install

bun add @nifrajs/web-vanilla

Docs

MIT

For AI agents

Start with LLM.md - this package's contract card (the exports you call + its footguns), one cheap read instead of the whole corpus. For the wider framework: the repo's AGENTS.md is the copy-paste quick reference, and llms-full.txt is the full machine-readable corpus. Run nifra check as the done-gate, or nifra mcp to give the agent live project tools.