Semantic HTML, natively reactive

BaseNative brings Angular-inspired control flow to native template elements with a small runtime core, server rendering, and CSP-safe template evaluation. The examples in this repo still use standard workspace tooling.

Features

Everything you need to build reactive server-rendered interfaces.

How it works

Write standard HTML with template directives. BaseNative handles the rest โ€” server-side or client-side.

Reactive counter in 6 lines

<button @click="incrementCount()">
  Clicked  times
</button>

<script type="module">
  import { signal, hydrate } from 'basenative';
  const count = signal(0);
  function incrementCount() { count.set(count() + 1); }
  hydrate(document.body, { count, incrementCount });
</script>

Server-rendered list with Express

// server.js
import { render } from 'basenative/server';

app.get('/', (req, res) => {
  const html = render(`
    <template @for="user of users">
      <li></li>
    </template>
  `, { users });
  res.send(html);
});

Recent updates