K2: An Ultra-Fast Alpine.js Alternative Built on TC39 Signals
A 3.6KB gzipped reactive framework with Alpine.js-compatible directive syntax and fine-grained reactivity from TC39 Signals. About 4x smaller than Alpine.js and 5 to 10x faster on updates, with zero runtime dependencies and full TypeScript support.
K2 keeps the part of Alpine.js people like, declarative x-data, x-text, x-show, x-model, and @event directives in plain HTML, and rebuilds the reactivity on the TC39 Signals proposal.
- Tiny. 3.6KB gzipped, compared with roughly 14KB for Alpine.js and 7KB for Petite-Vue.
- Fast. Signals give fine-grained updates, so a change re-renders only the bindings that depend on it.
- Familiar. Existing Alpine.js markup mostly works as-is.
- Zero dependencies, written in TypeScript, published on npm as
@farhanaliraza/k2-js.