mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
353 B
353 B
Use OS Theme
Naive UI provides useOsTheme
to get the current theme of your OS.
<n-config-provider :theme="theme">
<n-card>
Your current system theme is {{ theme }}.
</n-card>
</n-config-provider>
import { useOsTheme } from 'naive-ui'
export default {
setup () {
return {
theme: useOsTheme()
}
}
}