Mi

Mizu.js – Lightweight HTML templating library for any-side rendering

Hacker News

Mizu.js – Lightweight HTML templating library for any-side rendering

Hey HN, I'd like to share a fun project I've been working on: mizu.js. It's a js library that add functional attributes support into your html, designed to be a simple and flexible alternative to fully-fledged web frameworks (such as Vue, React, and Angular), while offering more capabilities than other lightweight options (like Alpine.js and htmx). As it's written using modern ES features and due to its isomorphic nature, it can be run in both browsers and runtimes (Node, Deno, Bun) without any changes. This makes it ideal for client-side and server-side rendering, as well as static site generation, whichever environment you prefer. Just include the script in any web page (or backend) to get started. You can template content, bind attributes, add interactivity, handle HTTP interactions, create custom components, and much more — all out of the box, without any configuration, transpilation steps, or builds. I hope you'll find mizu.js as exciting and useful as I do and I'd love to get your feedback! You can learn more about it at https://mizu.sh ! Online playground: https://mizu.sh/playground Custom builder: https://mizu.sh/build Code coverage: https://mizu.sh/coverage GitHub: https://github.com/lowlighter/mizu ## Motivation ## Nowadays, setting up a complete environment and installing thousands of packages is often required just to create a simple "Hello World" page. Yet, with the current ECMAScript standard, vanilla JS has never been more powerful. It offers built-in custom HTML components, proxies for changes tracking, weak references for better memory management, and many new data structures and methods. So why is web development still insanely complex? mizu.js aims to avoid adding bloat on top of native features, and instead focus on providing convenience helpers. It's basically "glue" around all these native features with added sugar, a recipe for a lightweight yet powerful utility. All evaluated expressions are interpreted as vanilla JavaScript, and you add your instructions directly into your HTML. So if you know already know about JS/HTML, then you're already 80% know of how to use mizu.js (add an extra 10% if you've used Vue, Alpine.js or htmx in the past as some syntax and concepts are inspired by it), the rest is basically just remembering the directive names. The learning curve is that small. Also, you may have heard of https://matcha.mizu.sh , a CSS stylesheet to instantly make your web page stylized. Well, it's a great companion to mizu.js. With both of them, you can create MVPs for your projects super fast!

Share card

Actual performance

225points
86comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: started · Missing: supports, reddit linkedin, podcasting
94%94% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: new, activity, using · Missing: mac, agents, macos
84%84% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: lua, ide, io · Missing: https docs, excited, just released
70%70% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoStrong fit for a featured deal · Strong signals: builder · Missing: plus, platform, intuitive
59%59% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
36%36% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
11%11% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ch
Checkboxland – A library for rendering anything as HTML checkboxes47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Checkboxland – A library for rendering anything as HTML checkboxes

Hacker News5
Gr
Grains.js Library for Stateful HTML58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Grains.js Library for Stateful HTML

Hacker News2
Vu
Vue.js – v-outer-HTML directive57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Vue.js – v-outer-HTML directive

Hacker News1
Kw
Kwery.js - lightweight wrapper for webSql38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Kwery.js - lightweight wrapper for webSql

Hacker News2
Py
PyParsy an HTML Parsing library with YAML definitions41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PyParsy an HTML Parsing library with YAML definitions

Hacker News2
A
A monad transformer library in JS52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A monad transformer library in JS

Hacker News2
Wi
Wiv.js – A library for a more wiggly div68%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Wiv.js – A library for a more wiggly div

Hacker News265
Me
Mechanic.js, a jQuery-esque UIAutomation library52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Mechanic.js, a jQuery-esque UIAutomation library

Hacker News5
JS
JS Cohort Viz library54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

JS Cohort Viz library

Hacker News3
Ar
AreYouSure.js, the 2Kb library for saner confirmation dialogs54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AreYouSure.js, the 2Kb library for saner confirmation dialogs

Hacker News1