WebReflection/hyperHTML is one of the developer-focused repositories TopGit tracks, currently at 3.1k stars, written primarily in HTML. A Fast & Light Virtual DOM Alternative
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This module is great, works great, and served me greatly, but there's a pletora of modern, faster, more capable alternatives me, among many other OSS developers, offer so that if obvious bugs are proven to exist, these will be fixed, but there won't be a major release and I won't remove legacy support for stuff that, as previously mentioned, works just fine and it's battle-tested from IE to the latest Chrome.
Removing that legacy support brings pretty much nothing in terms of size too: this module is already smaller than 90% of alternatives out there, dropping 0.xK so that there's less code that, behind feature detection, is not even used in modern browsers, won't benefit anyone.
Thansk for your understanding and for not opening PRs which goal is to drop a check for legacy browsers ... these won't likely be merged ever as that'd be a major release update and I don't think anyone is interested in that.
📣 Community Announcement
Please ask questions in the dedicated discussions repository, to help the community around this project grow ♥
A Fast & Light Virtual DOM Alternative.
Following an overview of projects related, or inspired by, hyperHTML. For a deep comparison of current libraries, feel free to check this gist out.
µhtml
The latest, smallest, iteration of all best concept from this library since 2017, have been packaged in ~2.5K. If it's extreme minimalism and great DX that you are after, check uhtml out.
hypersimple
If you've just started with template literals based projects and you like components, or you'd like to understand what's hyperHTML capable of, give hypersimple a try 🎉
lighterhtml 💡
This little brother is "showing off" these days, claiming better performance and unprecedented ease of use.
GitHub Repository
Neverland 🌈🦄
If you like React hooks concept, don't miss this little wrap that adds 0.something overhead to the already lightweight hyperHTML, bringing in very similar concepts.
Blog Post
GitHub Repository
Haunted 🦇 🎃
If you also like React hooks mechanism and you'd like to combine these via hyperHTML or HyperHTMLElement, try haunted out!
Bundlers
You can require or import hyperHTML with any bundler and in different ways.
If requiring or importing from "hyperhtml" doesn't work, try requiring from "hyperhtml/cjs" for CommonJS friendly bundlers (WebPack), or "hyperhtml/esm" for ESM compatible bundlers (Rollup).
See HELPERS.md for a list of additional tools which can be helpful for building hyperHTML based web applications.
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
Backers
Thank you to all our backers! 🙏 [Become a backer]
Contributors
This project exists thanks to all the people who contribute. [Contribute].
2.34 Highlights
the new ?boolean=${value} syntax from µhtml has landed in hyperHTML too. Feel free to read this long discussion to better understand why this syntax is necessary.
V2.5 Highlights
<self-closing /> tags for both custom elements and any other as well 🎉
V2 Highlights
Following most important changes in version 2:
fully rewritten, and consumable, as ES2015 Module
usable via CDN as bundled global hyperHTML variable
restructured in modules, utilities, helpers, and commented all over for simplified contribution
removed.escape and .adopt, either useless or unstable. hyperHTML.adopt will be implemented as module a part
added support for objects as style attribute, fully compatible with Preact implementation
improved performance in numerous ways
custom elements V0 and V1 are now fully, and properly, supported through document.importNode and/or regular cloneNode tested against common polyfills
back to 4.6K thanks to rollup and its ability to merge all the things together like it was already in V1
Documentation
A proper documentation full of examples can be found in viperhtml.js.org.
Basic Example
The easiest way to describe hyperHTML is through an example.
// this is hyperHTML
function tick(render) {
render`
<div>
<h1>Hello, world!</h1>
<h2>It is ${new Date().toLocaleTimeString()}.</h2>
</div>
`;
}
setInterval(tick, 1000,
hyperHTML(document.getElementById('root'))
);
Features
Zero dependencies, no polyfills needed, and it fits in about 4.6KB (minified + brotli)
Uses directly native DOM, no virtual DOM involved
Designed for template literals, a templating feature built in to JS
Compatible with plain DOM elements and plain JS data structures
Also compatible with Babel transpiled output, hence suitable for every browser you can think of
Compatibility
IE9+ , iOS8+ , Android 4+ and every modern Mobile or Desktop Browser.
You can verify directly through the following links:
100% code coverage for browsers natively compatible with string literals
100% code coverage for IE9+ and browsers that need transpiled code
Weakmap error on ie < 11
'@ungap/weakmap': object is not extensible
Babel freezes the template literals by spec but that causes problems with the weakmap polyfill. To fix this error add the fix explained on ungap/weakmap
HTML Syntax Highlight
If you are using Visual Studio Code you can install literally-html to highlight all literals handled by hyperHTML and others.
Prettier Templates
If you'd like to make your templates prettier than usual, don't miss this plugin: https://github.com/sgtpep/prettier-plugin-html-template-literals
Questions ?
Please ask anything you'd like to know in StackOverflow using the tag hyperhtml so that others can benefit from answers and examples.
hyper or lit ?
You can read more on this hyperHTML vs lit-html comparison.
Does WebReflection/hyperHTML have a project website?
No homepage URL was recorded for WebReflection/hyperHTML in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on WebReflection/hyperHTML?
The most recent commit recorded on WebReflection/hyperHTML was 3.3 years ago, based on the GitHub push timestamp. The repository has 111 forks — one of the better signals of community interest.
How many stars does WebReflection/hyperHTML have?
WebReflection/hyperHTML has 3.1k GitHub stars — refresh the page for the live number, or check github.com/WebReflection/hyperHTML. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is WebReflection/hyperHTML written in?
WebReflection/hyperHTML is written primarily in HTML. GitHub's language field is based on the largest share of bytes in the default branch.
What license does WebReflection/hyperHTML use?
WebReflection/hyperHTML is released under the ISC license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is WebReflection/hyperHTML associated with?
Where do I read more about WebReflection/hyperHTML?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/WebReflection/hyperHTML is the definitive source.
Read full README in the tab above.
Is hyperHTML worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of hyperHTML.