hyperscript is in active development and is working to a 1.0 release.

At this time the syntax and core feature set are considered to be reasonably complete. Key areas of focus for 1.0 include additional test cases and documentation improvements.

Please join us at the #hyperscript discord channel as we push to 1.0! Thank you!

intro

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.

examples

<script src="https://unpkg.com/hyperscript.org@0.8.0"></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>

demos

Here are the examples above in demo form:

Mouse Over Me!
I'm a helpful message!

origins

Hyperscript was originally inspired by HyperTalk.

haiku

the unknown button
so often inscrutable
now says what it does