Let your visitors choose their experience. Add a theme toggle to your Webflow site in minutes — no coding required.
Use these attributes to control how elements respond to theme changes:
Attribute
You can add data-theme-text
, data-theme-bg
, or data-theme-link
without assigning any values. If no data-dark
or data-light
is provided, default styles are applied automatically:
#000
(light), #fff
(dark)#fff
(light), #000
(dark)To use different colors for text and background, add them to separate elements.Then assign data-dark
and data-light
to each one:
Install the Theme Switcher App to give your visitors full control of their experience. It works with any Webflow project, is blazing fast, and easily customizable — no code required.
✅ Step 1: Copy the Script
✅ Step 2: Paste It in Webflow
Go to your Webflow project settings → Custom Code tab → scroll to the Before </body>
tag section and paste the script there.