spræ

Signal-Powered Reactive Ættributes 

Hydrate HTML/JSX tree with signal-powered reactive attributes.
HTML
<div :scope="count=0">
  <button :onclick="count++">+</button>
  <button :onclick="count--">–</button>
  Count: <span :text="count"></span>
</div>

Reference

dir

Set text content.

<span :text="user.name">Guest</span>
mod

Set text content.

<span :text="user.name">Guest</span>

FAQ

Why sprae?

Define UI wiring at the HTML/JSX markup layer, decluttering app logic and components.

  • Minimal syntax, valid HTML
  • Signals based, preact-signals compatible
  • No build step, no config, zero dependencies
  • Ecosystem-agnostic (CDN, ESM, JSX)
  • Open, extensible, configurable
  • Safe, fast and practical.

Perfect for SPA, PWA, static sites, GitHub Pages, prototypes, lightweight UIs, etc.

Made with 🫰 for better DX.

Why not Alpine.js?

Less clutter, less weight, better integration with app logic: signals support, open state, ESM, extensibility, aliases and sequences.

Why not Vanilla JS?

Declarative reactivity instead of walls of DOM manipulations: createElement is wrong mantra.

Why not Next/React?

Sprae works well with JSX, which helps preventing unnecessary client components. But some find react not worth the time.

Why signals?

Signals is standard primitive for reactivity. Preact-signals provide minimal API surface, and are useful outside of react/preact context. When the

Who cares for progressive enhancement?

Who builds long-lasting, low-maintenance, fail-proof, accessible, portable SEO-optimized web.

Is it just a toy?

It is used in production, but it's fun to play and comes with state sandbox.

Does it scale to complex state?

As far as you can handle it and CPU allows. Sprae has good performance.

Is new Function unsafe?

If your HTML comes from strangers or requires CSP, there is safe evaluator.

Components support?

Awaiting the DCE proposal, meanwhile we have to manage duplication.

Is there ecosystem?

Not yet.

TypeScript support?

If you need it please leave a request.

Browser Compatibility?

Any browser with Proxy support.

Is it stable?

Yes, since v10.

How old is it?

enough years old (first commit Nov 7, 2022).

Will it be maintained long-term?

12 versions, 1.5k+ commits and future plans.

What’s future plan?

Plugins, components, integration cases, generators.

Is it backed by a company?

No. Just regular devs. You can support it!