Every HTTP verb
GET, POST, PUT, PATCH, DELETE. Forms, files, headers, values, timeout, and credentials.
v1.6.1 · 4.0 KB gzip · zero runtime deps
Minu fetches server-rendered HTML and puts it where it belongs. Forms, polling, out-of-band updates, and SSE — without a SPA, a router, or a build step.
npm install minu
Auto-loaded fragment
This card was fetched from demo-price.html by Minu.
It is not hard-coded into this page.
Quick start
No bundler required. Load the UMD build from npm/unpkg, or import the ESM build from a bundler.
<script src="https://cdn.jsdelivr.net/npm/minu@1.6.1/dist/minu.min.js"></script>
<div minu-get="/widgets/price"
minu-trigger="load"
minu-target="#price">
<div minu-content>Loading…</div>
</div>
<div id="price"></div>
<script>minu.init();</script>
Minu swaps the response into the target. No JSON schema, no client templates.
minu-get, minu-post, and the other verbs. Forms serialize automatically.
Listen with addEventListener. Everything bubbles and is cancelable where it matters.
What is inside
GET, POST, PUT, PATCH, DELETE. Forms, files, headers, values, timeout, and credentials.
every 5s, revealed, intersect, once, changed, debounce, throttle, and from:.
innerHTML, outerHTML, before/after positions, delete, and none.
minu-oob updates carts, toasts, and counters from a single HTML payload.
Native EventSource with reconnect, named events, OOB updates, and one-connection fan-out.
Minu-Trigger, Minu-Redirect, and Minu-Refresh let the server steer the client.
Try it here
This is a real Minu instance on this page, fetching static fragments from this GitHub Pages site. The same code runs against dynamic endpoints locally.
Pick a tab to fetch its fragment.
Runnable gallery
The repository ships 12 self-contained examples. Each card opens a separate page;
the dynamic responses are simulated on Pages and real when you run
npm run examples locally.
Every example above is a separate page. GitHub Pages is static, so the dynamic
scenarios (form, polling, SSE, OOB, search, events) use a small browser-side
adapter. Run npm run examples for the real Node server.
Positioning
Minu is for Rails, Django, Laravel, PHP, and Express apps that already render HTML. It is not a router, a state manager, or a template language. It is the smallest useful bridge between a server-rendered page and a fragment request.