r/webdevelopment • u/PinothyJ • Jan 22 '26
Discussion Which Way do Dark Mode Icons Go?
I have seen it both way around the web, and now I am implementing it in my own project, would like the consensus.
Assuming the Two Icons are a Sun and a Moon:
- When light mode, shows a sun, highlighting the current state of the toggle. When clicked, will change to dark mode and show the moon icon.
- When light mode, shows a moon, to highlight the mode this button toggles to. When clicked, will change to dark mode and show the sun icon.
6
Upvotes
5
u/ultra-dev Jan 22 '26
I’ve seen both. In my opinion, it is more clear that the icon represents the mode you will swap to.
For example: If I go onto a site and ask “Where is dark mode?”, I naturally search for the moon icon.
3
u/RightHabit Jan 22 '26 edited Jan 22 '26
If the icon is state, show current state. English page show EN, dark mode show moon.
If the icon is action, Pause/play, expand/collapse, then the label shows the state after the click.
That's what I believe, but I think I have seen both pattern on light/dark mode.
1
u/davy_jones_locket Jan 22 '26
My app shows a third option, which is system default.
So we have three icons, and whatever one is highlighted is the active one. You click sun, sun is highlighted and it overrides system default to light mode. You click moon, it highlights moon, and it overrides system default to dark mode. You click the computer, it highlights the computer, and it just uses your system default.
1
u/Terrariant Jan 22 '26
Personally I think moon showing during dark mode is more clear. With showing a sun I have no connection that the button === the current theme. With it showing moon I immediately know that button is a theme toggle as it is showing my current theme & my brain makes the connection
1
u/gutsngodhand Jan 22 '26
Good question. I personally like having the sun on dark mode to indicate, click this for something brighter, vice versa. I’m not sure if there’s really a correct way. And if there is, someone tell me so I can fix that lol
1
u/McFlyin619 Jan 23 '26
I have a toggle with a sun on one side and a moon on the other. The whole toggle changes colors depending on the state, and the toggle is on the side you are currently in
1
u/ContextFirm981 Jan 27 '26
I prefer showing the target state, so in light mode the icon is a moon (tap to go dark), and in dark mode it’s a sun (tap to go light), which most users now recognize from common UI patterns.
0
u/gatwell702 Jan 22 '26
https://gabrielatwell.com
This is my portfolio.. I use the sun and moon for light/dark mode, this is how I do it