Picture of Michael Lee
:wave: Hey hey, I'm Michael Lee! This is my site about being a developer, a dad and a maker.

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.

Thanks for taking the time to read this article. I'd love to stay in touch and share more tips on programming and design and side projects. Sign up and I'll send you my articles straight to your email.