Crumbl — A tiny JavaScript framework

I am excited to finally share Crumbl with the world. It’s a lightweight JavaScript framework with a progressive vision: true separation of content, presentation and logic. Check it out at

A guilty conscience

It’s been quiet on my blog lately, but for good reason. I have been busy writing my very own JavaScript framework.

Like a lot of developers, I feel guilty sending a huge JavaScript payload to the user just to have a collapsable list somewhere on the website. jQuery is one hell of a framework and I always loved using it, but 9 out of 10 websites I used it for didn’t even use 10% of what jQuery is capable of. Users are loading the other 90% of jQuery for no good reason.

I would like to apologize to the users of those sites here: I’m sorry.


I needed to make it up to the internet and so I wrote Crumbl. Crumbl has all the methods I needed in those 9 out of 10 websites and was written with two big ideas in mind:

1. It had to follow jQuery’s way of writing JavaScript to make the transition for developers accustomed to jQuery as smooth as possible. This means, using the dollar sign notation to invoke Crumbl, using the same name and syntax for most methods and being able to chain functions together for fast coding.

2. It could only contain JavaScript-exclusive functionality. CSS methods, animation methods and the like have all been left out: predefined CSS classes and CSS3 animations can fully replace them.

The result is a nice, lightweight JavaScript base for your average website. Great to support all your simple website scripting like modal pop-ups, tabs, lightboxes, showcases and responsive navigations.


Crumbl weighs in around 10 KB (4 KB gzipped). I’m quite excited about its size because in most cases, I can just paste Crumbl at the top of my script file and the file will still be small.

A big part of Crumbl is the CSS selector engine. I’m currently using Dustin Diaz’s Qwery simply because I had used it in the past and it supports the use of contexts, which speeds up queries. As Crumbl evolves, this might change.

There’s more

I will be rewriting some of my web controls so they run on Crumbl instead of jQuery, which makes choosing between the two frameworks even easier. They will be released on the crumbs page on the Crumbl website. I’ve already planned a social media plugin, a lightbox and a showcase control and I’ll be adding more in the future.

Give it a go

I’ve thoroughly enjoyed writing Crumbl and it’s made my love for JavaScript even stronger (time to dive into Node). I hope you agree with the idea behind it and consider using it in one of your upcoming projects.

Please spread the word if you like Crumbl but don’t hold back if Crumbl doesn’t live up to your expectations. All feedback is welcome.

Visit the Crumbl website for more information and complete documentation or follow it on Twitter @crumbljs.