Components are classes
Declared with TC39 standard decorators. A component is constructed once and never re-run to produce a view.
A TypeScript UI framework with Angular-shaped components, Vue-shaped templates, and TC39 signals — and no virtual DOM anywhere.
import { Component, Signal } from '@voltdev/core';
@Component({
selector: 'v-counter',
templateUrl: './counter.html',
})
export class Counter {
count = new Signal.State(0);
increment() { this.count.set(this.count.get() + 1); }
decrement() { this.count.set(this.count.get() - 1); }
}<!-- counter.html -->
<div>
<button :click="decrement()">−</button>
<output>{ count.get() }</output>
<button :click="increment()">+</button>
<p :if="count.get() > 9">That's a lot.</p>
</div>Pressing + updates one text node. Not the component, not a subtree — the text node whose value changed.
The core is components, templates and signals. Around it, each in a package of its own so an application carries only what it imports:
@Server() runs on the server and is called from the browser as if it were local.Volt is pre-alpha, and two things follow from that. Several of these are partly built, and each page says which parts — a reader who finds out from an exception is worse off than one who read it first. And only the core is on npm: core, reactivity, compiler and the Vite plugin. The rest are in the repository and not yet released, and each of their pages says so at the top. This site documents the repository, which is ahead of the published alpha.