Reactive scripting
hx-live is an HTMX extension to ease reactive scripting for the web. It is inspired by Alpine, jQuery and hyperscript. State lives in data-* attributes, hx-on:* changes it and hx-live:* keeps the markup in sync.
The gradient playground below is plain server-rendered HTML: every slider writes one data-* attribute, and the preview, the labels and the CSS code are bindings that recompute whenever the state changes. Open your dev tools and watch the attributes change.
hx-live20° → 330°