vuejs / vuepress

📝 Minimalistic Vue-powered static site generator
https://vuepress.vuejs.org
MIT License
22.59k stars 4.76k forks source link

Add Dark Mode Toggle with Light Icon to Indicate Light Mode Switch and Vice Versa #3227

Open vikas-yadav2002 opened 1 month ago

vikas-yadav2002 commented 1 month ago

Feature request

What problem does this feature solve?

Currently, the dark mode toggle may cause confusion as users might expect the icon to represent the current mode instead of the mode they are switching to. By showing a light icon when in dark mode, it will clearly indicate that clicking the button will switch to light mode, improving the user experience and reducing ambiguity.

What does the proposed API look like?

A toggle button that shows a light icon (e.g., sun) when dark mode is active, indicating that clicking it will switch to light mode.

How should this be implemented in your opinion?

The button's icon should change dynamically based on the current mode:

Are you willing to work on this yourself?

Yes, I am willing to work on this feature.