Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Mini-Van: A minimalist template engine for DOM generation and manipulation, working for both client-side and server-side rendering (SSR)
Mini-Van is an ultra-lightweight (0.7kB minified, 0.5kB gzipped) template engine for DOM composition and manipulation that renders UI with vanilla JavaScript functions instead of JSX, working both in the browser and on server-side runtimes.
Mini-Van is a minimalist, zero-dependency template engine that maps JavaScript function calls such as div(...), p(...), and ul(li(...)) directly to HTML elements or markup. It accepts plain JavaScript values — strings, numbers, other tag functions, and attribute objects like a({href: "https://vanjs.org/"}, "🍦VanJS") — and produces either real DOM nodes or HTML strings depending on the mode. It is created by the VanJS project as a slimmed-down sibling of the VanJS reactive UI framework, with state management removed to reach a smaller bundle and enable server-side string rendering.
Mini-Van's documented feature set is built around sub-kilobyte size, zero dependencies, and a VanJS-compatible component API. The concrete capabilities below all come from the project page.
Hello example uses div, p, ul, li, and a tag functions directly and appends the result with van.add(document.body, Hello()).van-plate mode generates HTML purely through text templating with a render() method and no DOM requirement, while mini-van mode creates real DOM objects and needs a third-party Document such as jsdom on Node.js or deno-dom on Deno.mini-van-plate runs in Node.js and Bun, and a Deno module is published at deno.land/x/minivan requiring Deno 1.35 or later; the van.html helper prepends <!DOCTYPE html>.mini-van-0.6.3.min.js or load the nomodule variant for environments without ES6 support.Mini-Van is aimed at developers who want DOM composition and server-side HTML rendering without JSX, frameworks, or a build step. The four scenarios below map directly to documented examples in the project.
mini-van-plate, import tag functions from van.tags, and call van.html(...) inside an http.createServer handler to serve dynamic HTML pages.Deno.serve in either van-plate or mini-van mode, with DOM mode using the DOMParser from deno-dom.van.add(document.body, Hello()) or standard appendChild.The documented examples show one concrete task per runtime and rendering mode. Each of these scenarios has working sample code in the project documentation.
res.setHeader('Content-Type', 'text/html; charset=utf-8').Deno.serve and the van.html(...) helper imported from deno.land/x/minivan.Hello component from nested tag functions, log the resulting HTMLAnchorElement for the a tag, and append the whole tree to the document body.Install the package with npm install mini-van-plate (or import the Deno module), then call tag functions destructured from van.tags to build a tree. In van-plate mode, call .render() on a tag result or the van.html(...) helper to get a complete HTML string; in mini-van mode, pass a third-party Document to van.vanWithDoc(...) and receive real DOM elements you can serialize with outerHTML.
The project page states these advantages and limitations directly, so they reflect documented behavior rather than opinion.
Mini-Van is free and open-source. The VanJS project states it has "no intention or plan on commercialization whatsoever" and asks for GitHub stars and issue feedback rather than payment.
Yes. Mini-Van is open-source software published on GitHub and npm, and the VanJS project explicitly states it has no intention or plan for commercialization. The maintainers ask for GitHub stars and issue reports in return.
No. Mini-Van intentionally omits the state and state binding features of VanJS to keep the bundle at 0.5kB gzipped and to enable server-side string rendering. If you need reactive state, use VanJS instead.
van-plate mode generates HTML through pure text templating and needs no DOM implementation, so it works in Node.js, Bun, and Deno. mini-van mode creates actual DOM objects, so it requires a third-party Document such as jsdom (Node.js) or deno-dom (Deno), and does not yet work in Bun.
The npm package mini-van-plate supports Node.js and Bun, and a Deno module is available at deno.land/x/minivan for Deno 1.35 or later. The client-side build loads in browsers via jsdelivr as either an ES module or a nomodule script.
Yes. The VanJS website hosts an online converter at vanjs.org/convert that takes any HTML snippet and outputs the equivalent Mini-Van tag-function code, which you can then paste into your project.
