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.