Day night Mode switch

Hey Webflowers,

Hope you’re all having a great day!

I’m looking to add a night dark mode on my website. I currently have it set so every page is cloned, with a new css class on each item called [dark mode], and then I have a button on each page that links to the dark version of the current page. This works kinda ok, but it’s a faff to double update things.

Is there a way of toggling a css class across the entire website with a button using java or similar? That way I could have one button that would toggle the class site wide which would be much more elegant.

Thanks in advance!

  • Steve

Here is my public share link: LINK
(how to access public share link)

You may try this method of adding-removing classes.