Skip to content

[dark-mode] set dark mode methods #5494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
YunYouJun opened this issue May 23, 2025 · 1 comment
Open

[dark-mode] set dark mode methods #5494

YunYouJun opened this issue May 23, 2025 · 1 comment
Assignees
Labels
💪🏻 enhancement New feature or request

Comments

@YunYouJun
Copy link
Collaborator

这个功能解决了什么问题

Support multiple methods to set dark-mode.

你建议的方案是什么

https://tdesign.tencent.com/vue-next/dark-mode

// 设置深色模式
document.documentElement.setAttribute("theme-mode", "dark");
// 重置为浅色模式
document.documentElement.removeAttribute("theme-mode");

Support more set dark mode methods, like this: https://vitepress.dev/reference/site-config#appearance

Also support selector '.dark' or custom. See https://vueuse.org/core/useDark/

@YunYouJun YunYouJun added 💪🏻 enhancement New feature or request 🧐 unconfirmed waiting to be confirmed labels May 23, 2025
Copy link
Contributor

👋 @YunYouJun,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@uyarn uyarn removed the 🧐 unconfirmed waiting to be confirmed label May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪🏻 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants