Skip to content

Wrium

Full reactivity with minimal code size.

A minimalist JavaScript library for building reactive user interfaces with declarative HTML templates, zero dependencies, and no build step required.

🌐 Website (wrium.dev) • 📖 Documentation • 📦 npm Packages • 💬 GitHub

npm version Bundle Size License: MIT


✨ Overview

Wrium brings the elegance and ergonomics of modern reactive frameworks directly to your browser without the ceremony. No bundler, no virtual DOM overhead, and no build configuration to wrestle with — drop in a script tag or install via npm, write your HTML templates, and let Wrium handle DOM updates with fine-grained reactivity.

  • ⚡ Zero Build Step Required: Works right out of the box in plain HTML with native ES modules.
  • 🔮 Full Reactivity System: Automatic dependency tracking powered by ref(), reactive(), computed(), and watchEffect(), batched on microtasks for optimal performance.
  • 📝 Declarative Templates: Intuitive directives (v-if, v-for, v-model, v-show, v-text) and shorthand bindings (@click, :class, :style) that read your DOM directly.
  • 🧩 Modular Components: Define reusable UI components with reactive props via app.component() without JSX or compilation.
  • 🔌 Pluggable Architecture: Built-in and third-party directives use the exact same extensible registry.
  • 🪶 Ultra-Lightweight: Only ~10.9 KB minified for the complete core.
  • 🛡️ TypeScript Ready: Ships with native, fully-typed .d.ts declaration files with proper generics (ref<T>, computed<T>).

🚀 Quick Start in 30 Seconds

Option 1: Direct in HTML (Zero Build Tools)

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Wrium App</title>
</head>
<body>
  <div id="app">
    <h1>{{ title }}</h1>
    <p>Count is: <strong>{{ count }}</strong></p>
    <button @click="count.value++">Increment</button>
  </div>

  <script type="module">
    import { createApp, ref } from 'https://unpkg.com/@wrium/wrium/dist/1.0.0/wrium.es.js';

    createApp(() => {
      const title = ref('Hello Wrium!');
      const count = ref(0);
      return { title, count };
    }).mount('#app');
  </script>
</body>
</html>

Option 2: Via npm / bundler

npm install @wrium/wrium
# or
bun add @wrium/wrium
import { createApp, ref, computed } from '@wrium/wrium';

createApp(() => {
  const search = ref('');
  const items = ref(['React', 'Vue', 'Svelte', 'Wrium']);

  const filtered = computed(() =>
    items.value.filter(item => item.toLowerCase().includes(search.value.toLowerCase()))
  );

  return { search, filtered };
}).mount('#app');

📦 The Wrium Ecosystem

The Wrium organization maintains the core framework alongside official tools, documentation, and plugins:

Repository / Package Description Status
wrium
@wrium/wrium
The core reactive UI library, declarative template compiler, and component engine. npm
wrium-evasive-button
@wrium/evasive-button
Playful runaway button directive (v-evade) with wall-sliding physics, radius leashing, and form completion triggers. Ready v1.0.0
wrium-password-strength
@wrium/password-strength
Real-time interactive password evaluation directive and security scoring. Ready v1.0.0
wrium-site The official documentation site and interactive playground running at wrium.dev. Live

🌐 Documentation & Resources


Crafted with passion for minimalist web craftsmanship. Released under the MIT License.

Pinned Loading

  1. wrium wrium Public

    🪱 The Minimalist Reactive JavaScript Library | Vue-inspired reactivity under 5kb GZip

    JavaScript 4 1

  2. docs docs Public

  3. password-strength password-strength Public

    JavaScript

  4. evasive-button evasive-button Public

    JavaScript

Repositories

Showing 8 of 8 repositories

Top languages

Loading…

Most used topics

Loading…