Temperature converter
Two-way inputs, derived values, and constraints that stay in sync.
An HTML-first JavaScript framework.
Bring a little life to a page—or build a whole app.
Start small. See where it takes you.
npm install @jnreis/briojsNo virtual DOM. No required compiler. No runtime dependencies.
A few lines. Big personality.
Pick a mood. Choose a color. Give it a name.
Or hit Surprise me and meet someone new.
b-model connects the controls.b-bind-style paints and sizes it.b-if swaps the mood extras.b-on-click rolls the dice.Remix this creature in the playground →
<div id="creature-builder"> <div class="creature-stage"> <div role="img" b-bind-aria-label="$data.greeting" b-bind-class="['creature', 'is-' + $data.mood, 'wiggle-' + $data.wiggles % 2]" b-bind-style="{ '--body': $data.color, '--size': $data.size / 100 }"> <span class="creature-zzz" b-if="$data.mood === 'sleepy'">z z z</span> <span class="creature-horns" b-if="$data.mood === 'mischievous'"></span> <span class="creature-eyes"><i></i><i></i></span> <span class="creature-cheeks" b-if="$data.mood === 'happy'"></span> <span class="creature-mouth"></span> </div> <p class="creature-name" b-text="$data.name.trim() || 'Unnamed creature'"></p> <p class="creature-greeting" aria-live="polite" b-text="$data.greeting"></p> </div>
<div class="creature-controls"> <fieldset> <legend>Mood</legend> <label><input type="radio" name="mood" value="happy" b-model="$data.mood"> 😊 Happy</label> <label><input type="radio" name="mood" value="sleepy" b-model="$data.mood"> 😴 Sleepy</label> <label><input type="radio" name="mood" value="mischievous" b-model="$data.mood"> 😈 Mischievous</label> </fieldset> <fieldset> <legend>Color</legend> <button type="button" class="swatch" b-for="color in $data.colors" b-key="$for.color" b-bind-style="{ '--swatch': $for.color }" b-bind-aria-label="'Color ' + $for.color" b-bind-aria-pressed="$data.color === $for.color" b-on-click="$data.color = $for.color"></button> </fieldset> <label>Size <output b-text="$data.size + '%'"></output> <input type="range" min="70" max="130" b-model.number="$data.size"> </label> <label>Name <input maxlength="16" placeholder="Give it a name" b-model="$data.name"> </label> <button type="button" class="button primary" b-on-click="$data.surprise()">🎲 Surprise me</button> </div></div>import { createApp } from '@jnreis/briojs';
const names = ['Blip', 'Mochi', 'Pip', 'Noodle', 'Ziggy', 'Bean', 'Gizmo', 'Waffles'];const moods = ['happy', 'sleepy', 'mischievous'];const colors = ['#5b8cff', '#ff7aa8', '#ffb347', '#4fd1a5', '#a78bfa', '#ffd84d'];const pick = list => list[Math.floor(Math.random() * list.length)];
export function createCreature() { return createApp({ state: () => ({ name: 'Blip', mood: 'happy', color: colors[0], size: 100, colors, wiggles: 0, get greeting() { const name = this.name.trim() || 'This creature'; if (this.mood === 'sleepy') return `${name} needs a nap.`; if (this.mood === 'mischievous') return `${name} is up to something.`; return `${name} is having a great day.`; }, surprise() { this.name = pick(names.filter(name => name !== this.name)); this.mood = pick(moods.filter(mood => mood !== this.mood)); this.color = pick(colors.filter(color => color !== this.color)); this.size = 70 + Math.round(Math.random() * 60); this.wiggles++; }, }), });}
createCreature().mount('#creature-builder');The creature is a few spans and ordinary CSS. No canvas, images, or component compiler. Build your first app, step by step →Start your own widget in StackBlitz ↗
From a widget to a whole app
A useful little tool. A dashboard full of data. A board for the whole project. Try one, then see how it works.
Two-way inputs, derived values, and constraints that stay in sync.
Async resources, complex derived data, SVG charts, and nested components.
Drag and drop, optimistic updates, nested state, and simulated teammate synchronization.
The dashboard and Kanban use simulated backends, data, or teammates, not hosted services. Some demos save data in your browser. Please don’t enter sensitive information.
No grand rewrite required
A menu, a form, a calculator. Mount Brio around just the interactive part. Leave your existing app alone.
Add a widget →Ordinary links, server-rendered pages, and reactive behavior right where you want it. No takeover required.
Enhance a page →Components, routing, shared state, async resources, and cleanup. The pieces for an app, without the ceremony.
Build an app →Bindings, models, keyed lists, transitions, and teleports. Familiar markup, a few powerful directives.
Fine-grained reactivity, computed values, explicit batching, and cancellable async resources.
Scopes give effects and resources a lifetime. Remove a component, release its behavior.
Optional routing, persistence, HTTP, validation, and tools. Tree-shakable ESM with TypeScript declarations.
Your turn
That’s plenty to start with. Let’s put it on a page.
Make your first Brio app →Want a head start? Open a starter template. Building with an AI assistant? Hand it llms.txt and the AI developer kit.