Reactivity for plain HTML.
Lyap is a small, simple, fast HTML enhancement library. Add reactive state, events, forms and loops directly in your markup — no build step, no framework, no lock-in.
Clicked times · doubled
Core features
No build step
Drop one script tag into any HTML file. No bundler, compiler or server required — it just works.
100% CSP compliant
Zero eval(), zero new Function(). A safe sandboxed micro-evaluator handles inline expressions.
Fast by design
Fine-grained reactive signals update only affected DOM nodes without expensive virtual DOM tree comparisons.
Declarative
State and logic live in standard <script> blocks scoped directly to your markup containers.
Scoped & inherited
Each container owns its scope. Child containers resolve ancestor state seamlessly by scope name.
Beginner friendly
Write HTML as usual, then sprinkle ly- directives. Learning Lyap takes minutes, not months.
Hello, world
State is declared next to the markup it controls. The container below is live:
<div>
<script>
const app = Lyap.scope('app');
app.state({ greeting: 'Hello from Lyap!' });
</script>
<p ly-text="app.greeting"></p>
</div>
That's it. No framework, no build, no config. Ready to dig in? Head over to the Getting Started guide.