tusen-ai / naive-ui

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.
https://www.naiveui.com
MIT License
15.89k stars 1.66k forks source link

Dark theme based on body class #5839

Open kickthemooon opened 5 months ago

kickthemooon commented 5 months ago

Clear and concise description of the problem

As a developer using Naive UI I want to be able to toggle the dark/light theme based on a class on the body so that I don't have to introduce other more specific implementations.

Suggested solution

Provide a way to configure Naive UI so that it is dark/light based on a class on the html body e.g. "dark".

Alternative

No response

Additional context

No response

Validations

skamansam commented 1 month ago

I would also like this feature, in order to be more compatible with tailwind.