Dark Mode Toggle adds a switch that swaps your site's global colours for a dark set. You choose the dark colours once in Global Settings. The visitor's choice is saved, so dark mode stays on as they move between pages.
Every switch on this page is a Dark Mode Toggle, and they all stay in step. The mini site and the colour chips use the global colours, so they change when you flip a switch. Your choice is saved, so it is still set when you reload the page.
Show Labels on with Light and Dark labels, a lilac track and a purple active track. The mini site below is coloured with the global brand, headings, links, text and background colours, so it changes with the switch.
Fresh sourdough from the bakery next door, eggs from a farm up the hill and coffee roasted in town. Sit in, take away or order ahead for collection.
Each toggle below has its own track, handle and label settings. They share one cookie, so flipping any of them flips the rest.
Each chip is filled with one of the colour variables the toggle changes. Flip any switch on this page and watch them change.
--bde-brand-primary-color--bde-headings-color--bde-links-color--bde-text-color--bde-background-colorSet the colours once, then place the switch wherever you like.
In Breakdance Global Settings, open the Dark Mode Colors tab and choose the brand, headings, links, text and background colours.
Drop Dark Mode Toggle into your header, footer or any page.
When a visitor flips the switch, the dark colours replace your global colours across the page.
A small switch that changes your site's global colours.
Swap the brand, headings, links, text and background colours for your dark set.
The dark colours live in Global Settings, so every toggle on your site uses the same set.
The visitor's choice is saved in a cookie for 30 days and applied on every page that has a toggle.
Place a toggle in the header and another in the footer. Flip one and the other follows.
Show text labels either side of the switch, such as Light and Dark, and style their typography.
Set the track and handle colours for both the on and off states.
Anywhere visitors read for a while or browse at night.
Give readers a darker page that is easier on the eyes in the evening.
Let developers read docs in the dark style many of them prefer.
Offer a dark version that shows off photos and artwork.
Match the dark mode your app already offers.
Put the switch in a global header so it is on every page.
Give visitors more control over how your site looks.
The element settings and the Dark Mode Colors tab in Global Settings, with their default values.
| Control | What it does | Default |
|---|---|---|
| Content | ||
| Label Text Off | Text shown on the light side of the switch. | Light |
| Label Text On | Text shown on the dark side of the switch. | Dark |
| Design | ||
| Show Labels | Show or hide the text labels. | Off |
| Inactive Background Color | Track colour when dark mode is off. | — |
| Active Background Color | Track colour when dark mode is on. | — |
| Handle Inactive Color | Handle colour when dark mode is off. | — |
| Handle Active Color | Handle colour when dark mode is on. | — |
| Typography | Text style for the labels. | — |
| Global Settings: Dark Mode Colors | ||
| Brand Colour | Brand colour used in dark mode. | #000000 |
| Headings Colour | Heading colour used in dark mode. | #333333 |
| Links Colour | Link colour used in dark mode. | #0066CC |
| Text Colour | Body text colour used in dark mode. | #222222 |
| Background Colour | Page background used in dark mode. | #FFFFFF |
In Breakdance Global Settings, under the Dark Mode Colors tab. The toggle needs these colours set to have any effect.
The tab only appears when Dark Mode Colors is switched on in the Features tab of the Phox Elements settings. It is off by default.
The toggle swaps Breakdance's global colours. Check you have set dark colours in Global Settings, and that your elements use the global colours rather than fixed colours.
Yes. The choice is saved in a cookie for 30 days, so dark mode stays on across pages and return visits.
Yes. Every toggle on the page stays in sync, so flipping one updates the others.
Yes. Set the track and handle colours for the on and off states, and turn on labels if you want text either side.
Dark Mode Toggle is included with Phox Elements, along with 140+ other premium elements for Breakdance.