naive-ui/demo/documentation/components/config-provider/enUS/os-theme.demo.md
2020-09-03 23:40:38 +08:00

255 B

Use OS Theme

Naive-ui provides $NOs.theme property to get the current theme of your OS.

<n-config-provider :theme="$NOs.theme">
  <n-card>
    Your current system theme is {{ JSON.stringify($NOs.theme) }}.
  </n-card>
</n-config-provider>