hyperscript is a scripting language designed for modern front-end web development.
hyperscript makes writing event handlers and highly responsive user interfaces trivial with native language support for async behavior - easier than promises or async/await.
hyperscript features include:
You can see a comparison of hyperscript, vanillaJS and jQuery here.
hyperscript is a companion project of htmx.
Because hyperscript relies on promises, it does not strive for IE11 compatibility.
<script src="https://email@example.com"></script> <button _="on click toggle .big-text"> Toggle the "big-text" class on me on click </button> <div _="on mouseenter toggle .visible on #help until mouseleave"> Mouse Over Me! </div> <div id="help"> I'm a helpful message!</div> <button _="on click log me then call alert('yep, it\’s an alert')"> Show An Alert </button>
Here are the examples above in demo form:
Hyperscript was originally inspired by HyperTalk.
the unknown button
so often inscrutable
now says what it does