# hyperscript

Dec 27, 2022

https://hyperscript.org/

Hyperscript is a scripting language for doing front end web development. It is designed to make it very easy to respond to events and do simple DOM manipulation in code that is directly embedded on elements on a web page.

Example

<button _="on click toggle .red on me">
Click Me
</button>


The first thing to notice is that hyperscript is defined directly on the button, using the _ (underscore) attribute.

The next thing you will notice about hyperscript is its syntax, which is very different than most programming languages used today. Hyperscript is part of the xTalk family of scripting languages, which ultimately derive from HyperTalk. These languages all read more like english than the programming languages you are probably used to.

This unusual syntax has advantages, once you get over the initial shock:

• It is very distinctive, making it obvious when hyperscript is being used in a web page
• It is very easy to read, making it obvious what a script is doing

From the authors of programming/javascript/HTMX

↑ up