DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป is a community of 968,873 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for Weekly Coding Challenge - Week #12 - Toggle
Florin Pop
Florin Pop

Posted on • Originally published at florin-pop.com

Weekly Coding Challenge - Week #12 - Toggle

Theme of the week: Toggle

Description

A toggle (or a switch) is a component which allows you to change a state / a boolean value from true to false and vice-versa. It is basically a checkbox, but we are going to hide it and display a nicer version of a toggle instead by using a label. ๐Ÿ˜„

Furthermore, in this article I'm going to build a Dark/Light theme toggle. See below!

Useful Resources

Check out my submission for this challenge: Dark/Light theme toggle.

See all the submissions in this Codepen Collection.

Are you interested in joining the challenge? ๐Ÿ˜ƒ Read The Complete Guide to find out how. Don't forget to share your creation! ๐Ÿ˜‰

Happy Coding! ๐Ÿ˜‡

Top comments (0)

In defense of the modern web

I expect I'll annoy everyone with this post: the anti-JavaScript crusaders, justly aghast at how much of the stuff we slather onto modern websites; the people arguing the web is a broken platform for interactive applications anyway and we should start over;

React users; the old guard with their artisanal JS and hand authored HTML; and Tom MacWright, someone I've admired from afar since I first became aware of his work on Mapbox many years ago. But I guess that's the price of having opinions.