Change background colour by clicking a button


I want to change my websites background colour with a button like this reference website :

when you click on the button in the right bottom corner the website changes to that specific colour.

Is this possible to achieve on Webflow?

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

Hello @Rhea, yes. this is definitely possible with Webflow.

I have set this up with an interaction showing you how to achieve this. Check out my read-only link.

If you need to cycle through different colors as seen on your example website, you could create separate buttons for each color and show/hide them depending on the order you are looking for.

Let me know if this helps.

1 Like

Hey Julian, this works but it is not a persistent dark mode interaction.

published site : ABOUT

read only link : Webflow - light to dark mode

in the home page if you click on the black button the background changes to black then you click on the menu and go to another page - that page is white.
this shows that the dark mode is not applied through the site ,the black button is only a page trigger.

is there a way to apply persistent dark mode with or without code?
without code option is preferable.