# Customizing theme
Naive-ui provides `n-config-provider` to customize the theme.
By default all of the components are light themed, without any configuration.
To learn more about `n-config-provider`, see [Config Provider](../components/config-provider).
## Use dark theme
Set `n-config-provider`'s `theme` prop to `darkTheme` imported from naive-ui to set dark theme inside `n-config-provider`.
If `theme` is `undefined` it won't affect the theme of components inside.
```html
```
You may need to include `` if you want to apply the dark theme globally, not just to the components.
To learn more, see [n-global-style](../docs/customize-theme#Sync-style-of-the-body-element).
## Get theme vars
Whether it's the default light theme (`lightTheme`), the modified dark theme (`darkTheme`), or the custom theme we adjusted, you can get theme variables within the scope of the theme using [useThemeVars](./theme#use-theme-vars).
## Customizing theme vars (design tokens)
No CSS (Scss, Less) needed.
The configured global theme variables will overwrite the theme variables that take effect on descendant components.
Set `n-config-provider`'s `theme-overrides` to customize theme vars. Naive-ui exports type `GlobalThemeOverrides` to help you define `theme-overrides`.
For available vars please follow the type hint of `GlobalThemeOverrides`.
If you want to view more theme variables, you can view them in the edit button at the bottom right corner of the Naive UI homepage.
You can modify the corresponding theme variable, you can get the themeOverrides object after export.
```html
```
## Customizing theme vars in TypeScript
If you are using ts to write code, this one is more suitable for you.
```html
```
## Customizing component theme vars
The use of component theme variables is the same as the use of global theme variables, and the component theme variables will override the global theme variables.
```html
theme
```
## Customizing theme vars under different themes
If you want to use different theme variables on light and dark theme at the same time, you can take a look at this.
```html
```
## Use the peers vars
In many cases, another component will be reused inside a component, so the theme variable of peers appears.
The theme variables related to peers have not been exposed yet. Use `GlobalThemeOverrides` to view the peers variables of the corresponding component.
The specific available peers will be updated later.
```html
```
## Sync style of the body element
For the following reasons, you may need to set some styles on `document.body`.
1. Naive-ui will mount some global style that is unresponsive (to theme, not media query). For example `font-family`. The style works fine by default, however they won't change when theme is changed.
2. `n-config-provider` can't sync global style (for example, body's background color) outside it.
You can use `n-global-style` to sync common global style to the body element. In the following example, `n-global-style` will sync the theme provided by `n-config-provider` to `document.body`.
```html
```
## Theme editor
Naive-ui provides a theme editor to help you edit theme and export the corresponding configuration. It can be placed inside `n-config-provider`.
The theme editor is not included in global installation (`app.use(naive)`). You need to import it explicitly to use it.
```html
```