Hyperscript tools for web craftsmen.
- ES6 module.
- Extremely well tested.
- Online
HTML
to hyperscript converter. - Online
HTML
formatter. - Optimized syntax for readability and clarity:
- All
HTML
tags without introducing global variables. Attributes
areobjects
and always precedechildren
.Style
attribute can bestring
orobject
.Class
attribute can bestring
orarray
.- Automatic transformation from
camelCase
tokebab-case
inattribute
andstyle
keys. Children
are alwaysarrays
and falsy values are automatically ignored.
- All
- Flexibility taken to the extreme:
The advantages of using hyperscript
to produce HTML
elements are many:
- No build steps required.
- No special text editor support required.
- No need to learn a new templating language.
- Standard debug and error analysis tools work normally.
- It is possible to use well-tested and defined functions to produce
HTML
elements. - It is possible to combine elements to produce complex applications.
- It can be used to generate
HTML
text,DOM
node, virtualDOM
, both in the browser and on the server. - Can be combined with any framework or library, both in the browser and on the server.
- Frameworks and libraries go in and out of use,
hyperscript
is just a function that will always be supported.
Most hyperscript
implementations are made with a specific use in mind,
associated with a framework, library or browser.
The objective of this module is to deliver a hyperscript
implementation that
allows a clear and expressive syntax to read, without making any assumptions
about its use.
This way, it is possible to use hyperscript
to create views and elements,
without being tied to a technology or page rendering strategy.
It's a very simple project. Any contribution, any feedback is greatly appreciated.
If this project was useful to you, consider giving it a star on github, it's a way to increase evidence and attract more contributors.
This work is hugely influenced by these amazing projects:
A huge thank you to all the people who contributed to these projects.