HTML-first reactive library
Live interfaces from plain HTML and JSON.
ElectricHTML is a tiny browser library for wiring JSON responses straight into the DOM with declarative attributes. It is meant for dashboards, operational tools, simple status views, and HTML-first interfaces that should stay small.
<section>
<div eh-data="latitude" eh-round="2"></div>
<div eh-data="longitude" eh-round="2"></div>
<div eh-data="altitude" eh-round="0" eh-postfix=" km"></div>
<div eh-data="velocity" eh-round="0" eh-postfix=" km/h"></div>
</section>
<script
eh-source="https://api.wheretheiss.at"
eh-data-route="/v1/satellites/25544"
src="./electric-html.js"
></script>
Small enough to understand at a glance.
ElectricHTML is most compelling when the goal is clarity. You can inspect the page, inspect the JSON, and see how the two map together without digging through framework abstractions.
The page remains normal markup. ElectricHTML adds a binding vocabulary instead of replacing the authoring model.
A simple API response can drive headlines, status values, metrics, lists, and lightweight user actions.
There is a wide middle ground between static HTML and a large app shell. ElectricHTML is aimed squarely at that space.
Markup you can still read quickly.
The point is not novelty. The point is staying close to the metal: plain HTML, a small script, and values flowing in from JSON.
<section>
<h2 eh-data="name"></h2>
<p eh-data="status"></p>
<p
eh-data="cpu.load"
eh-postfix="%"
eh-round="0"
></p>
</section>
<button eh-get="/api/refresh" eh-provides>
Refresh now
</button>
For the pages that want live data, not a giant app shell.
ElectricHTML fits operational UIs, monitoring pages, internal tools, wallboards, and focused prototypes where the simplest path from backend state to UI is usually the best one.