All Projects → WebReflection → Hyperhtml

WebReflection / Hyperhtml

Licence: isc
A Fast & Light Virtual DOM Alternative

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to Hyperhtml

Viperhtml
Isomorphic hyperHTML
Stars: ✭ 318 (-88.93%)
Mutual labels:  manipulation, lightweight, performance, template, vanilla
tsdom
Fast, lightweight TypeScript DOM manipulation utility
Stars: ✭ 16 (-99.44%)
Mutual labels:  lightweight, dom, manipulation
CalDOM
An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.
Stars: ✭ 176 (-93.87%)
Mutual labels:  lightweight, alternative, dom
Yalla
YallaJS, ES6 Templating Engine.
Stars: ✭ 253 (-91.19%)
Mutual labels:  lightweight, performance
Cms
GleezCMS - A Light, Simple, Flexible Content Management System
Stars: ✭ 200 (-93.04%)
Mutual labels:  lightweight, performance
Taskr
A fast, concurrency-focused task automation tool.
Stars: ✭ 2,421 (-15.7%)
Mutual labels:  lightweight, performance
Infrared
An ultra lightweight minecraft reverse proxy and idle placeholder
Stars: ✭ 59 (-97.95%)
Mutual labels:  lightweight, vanilla
string-combinations
A simple, low-memory footprint function to generate all string combinations from a series of characters.
Stars: ✭ 25 (-99.13%)
Mutual labels:  lightweight, manipulation
Rye
A modern, lightweight browser library using ES5 natives
Stars: ✭ 271 (-90.56%)
Mutual labels:  manipulation, dom
wui
Collection of GUI widgets for the web
Stars: ✭ 44 (-98.47%)
Mutual labels:  lightweight, vanilla
Mei.js
a minimal, simple and helpful library for you
Stars: ✭ 15 (-99.48%)
Mutual labels:  dom, manipulation
modulor-html
Missing template engine for Web Components
Stars: ✭ 36 (-98.75%)
Mutual labels:  dom, template-literals
Jsontree
A lightweight vanilla Javascript micro-library for making collapsible trees with JSON
Stars: ✭ 170 (-94.08%)
Mutual labels:  lightweight, vanilla
Butterfly
🔥 蝴蝶--【简单】【稳定】【好用】的 Python web 框架🦋 除 Python 2.7,无其他依赖; 🦋 butterfly 是一个 RPC 风格 web 框架,同时也是微服务框架,自带消息队列通信机制实现分布式
Stars: ✭ 82 (-97.14%)
Mutual labels:  lightweight, template
Api
Minimal, extremely fast, lightweight Ruby framework for HTTP APIs
Stars: ✭ 252 (-91.23%)
Mutual labels:  lightweight, performance
Torchlambda
Lightweight tool to deploy PyTorch models to AWS Lambda
Stars: ✭ 83 (-97.11%)
Mutual labels:  lightweight, performance
Uplot
📈 A small, fast chart for time series, lines, areas, ohlc & bars
Stars: ✭ 6,808 (+137.05%)
Mutual labels:  lightweight, performance
Dom99
Extend html with directives
Stars: ✭ 37 (-98.71%)
Mutual labels:  lightweight, dom
vanilla-jsx
Vanilla jsx without runtime. HTML Tag return DOM in js, No virtual DOM.
Stars: ✭ 70 (-97.56%)
Mutual labels:  dom, vanilla
tb-grid
tb-grid is a super simple and lightweight 12 column responsive grid system utilizing css grid.
Stars: ✭ 19 (-99.34%)
Mutual labels:  lightweight, alternative

hyper(HTML)

📣 Community Announcement

Please ask questions in the dedicated discussions repository, to help the community around this project grow


hyperHTML logo

A Fast & Light Virtual DOM Alternative.


donate Backers on Open Collective Sponsors on Open Collective WebReflection status

Coverage Status Build Status License: ISC Greenkeeper badge Blazing Fast


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 rea 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:

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.

literally-html example

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.

installation?

npm install hyperhtml

If your bundler does not work with the following:

// ES6
import hyperHTML from 'hyperhtml';

// CJS
const hyperHTML = require('hyperhtml');

You can try any of these other options.

import hyperHTML from 'hyperhtml/esm';
// or
import {hyper, wire, bind, Component} from 'hyperhtml/esm';
// or
import hyperHTML from 'https://unpkg.com/hyperhtml?module';


const hyperHTML = require('hyperhtml/cjs').default;
// or
const {hyper, wire, bind, Component} = require('hyperhtml/cjs');

In alternative, there is a pre-bundled require("hyperhtml/umd") or via unpkg as UMD module.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].