0.0.0-empty • Published 2 years ago
8l v0.0.0-empty
h-
Reduced version of HTM − HTML template tag literal.
- Fully compatible drop-in replacement for htm
- Handles HTML, XML, JSX.
- Optionally closed tags
- HTML/XML directives #91
- False arguments are ignored #129
- Dynamic attribute names #124
- Newline spaces are compatible with HTML #128
- Calculated tag names or props #109
- Quotes are escaped normally #96
- Customizable template parts.
- Parent reference for non-JSX template engines.
- Smaller than htm.
see also hydride.
Usage
The usage is identical to htm, the difference is sugaring and fully supported HTML syntax.
import htm from 'h-'
htm.bind({
name: (static, )
})
Comparison
Size | Performance | HTML-compatible | JSX-compatible | Output format | Production build | |
---|---|---|---|---|---|---|
h- | ||||||
htm | ||||||
domtagger | ||||||
nanohtml | ||||||
hyperx | ||||||
lit-html | ||||||
common-tags |