Tiny Javascript Libraries

I used to do a lot of flash banner ads.
Banner ads have tight requirements around file size so as not to bloat the hosting page’s download.
With banner ads migrating to HTML this is even more of an issue with often lack of compression.
Jack Doyle of Greensock wrote a great article talking about these problems and possible solutions.

Often making these banner ads in HTML we’re limited in what libraries we can use because of their file size.
However after looking into many of the libraries I use and how I use them, only a fraction of them are necessary for general use.
So I started looking at my rendering libraries (Snap.svg, Pixi.js).
I then took a quick stab at rebuilding them with a focus on just drawing and moving objects, nothing else, to focus on small file size.
So I started making them:

Element Libraries

I’ve named them after elements suggesting their stripped down nature focusing on the most basic necessities.


Hydrogen is a lightweight canvas rendering library and display list that is around 1k in file size.


Carbon is a lightweight SVG drawing library also around 1k.

I just started playing around with this and haven’t used them extensively yet, but I think it’s a neat idea.
Obviously these aren’t as powerful as a full library but that’s kind of the point.
Let me know what you think, are these valuable? What other kind of situation would you want a minimal library for?