--- title: Vanilla javascript theme toggle for simpletons date: 2023-06-26 tags: - javascript - css draft: false --- Sometimes when I'm trawling the internet and happen upon a particularly nice looking website, I develop css and javascript FOMO. The thing I've been lusting after above all else is one of those fancy little dark theme toggle buttons. As you can probably tell from the website you're looking at my web dev skills are limited. As a result of this I had assumed such niceties were out of reach. Last week though I decided it was time for this to change! I would do a teeny bit of javascript. I could have nice things. This is a rundown of the very simple implementation I came up with. ### HTML First things first, we'll need a button for users to click. This can be plopped wherever you want on your site. ```html