naive-ui/demo/documentation/components/config-provider/enUS/os-theme.demo.md

10 lines
255 B
Markdown
Raw Normal View History

2020-06-03 13:56:46 +08:00
# 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>
```