mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
10 lines
255 B
Markdown
10 lines
255 B
Markdown
|
# Use OS Theme
|
||
|
Naive-ui provides `$NOs.theme` property to get the current theme of your OS.
|
||
|
```html
|
||
|
<n-config-provider :theme="$NOs.theme">
|
||
|
<n-card>
|
||
|
Your current system theme is {{ JSON.stringify($NOs.theme) }}.
|
||
|
</n-card>
|
||
|
</n-config-provider>
|
||
|
```
|