Awesome Tiny JS Awesome

A collection of tiny JS libraries to put your bundle on a diet. Curated by Vladimir Klepov Rules:

Disclaimers:

Contents

UI Frameworks

UI frameworks (libraries?) provide declarative templates, event bindings, and observable state to update the view. I've been generous and expanded the size limit for this category to 4Kb, but also increased the star limit to 3K.

The following libraries are small and cool, but note they're about 500x less popular than preact. Kudos for deconstrucing the very essence of a "framework":

And if being declarative is not your thing:

Event Emitters

Event emitter pattern is fairly easy to implement yourself, but why bother when you have these cool tools? With an arms race to build the smallest one, the limit is 0.5Kb.

Reactive Programming

A step up from a raw event emitter, reactive libraries can build chains of event transforms, filters, and side-effects. You can already use these to build UIs by manually updating DOM on state change:

Honorable mentions: callbag-basics and oby could make it if they had tree-shaking, but otherwise are around 7Kb.

State Managers

State managers combine observable state with actions and framework bindings, intended for app-wide state.

Routers and URL Utils

Do stuff on URL / history changes, with path matching and parsing: