Reusable UI patterns

Written on February 24, 2019

Lately, I’ve been thinking a lot about reusable UI patterns. Things like a nav element and such. I’m not sure why I hadn’t done this before, but I’d like to put together a library of reusable UI patterns. This is so that I can get up and running quickly with projects, but also not having to rebuild the wheel every single time I need to build a common UI element.

For this reason, I spent a couple hours tonight putting together a nav element that is also fully responsive. It’s a common element that’s needed in pretty much any web application or web site nowadays.

It isn’t anything fancy, just HTML, CSS and vanilla JavaScript. I decided to go this route instead of building it in some fancy JS framework because it’s more portable and I think future proof. I’d like to also iterate on it by adding things like proper role attributes and accessibility minded things.

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming and side projects with you. Sign up and I'll send you my articles straight to your email, you'll also get a free copy of the light themed version of my Git cheat sheet.
Git cheat sheet preview image