2020-02-05 13:13:48 +08:00
# Use Style Scheme
2020-03-08 00:06:05 +08:00
Naive UI has a built-in style scheme. It's powerful for you to create Naive UI styled component. `n-config-consumer` & `n-element` have access to style scheme.
2020-02-05 13:13:48 +08:00
```html
2020-05-31 13:38:35 +08:00
< n-config-consumer v-slot = "{ styleScheme }" >
< button
:style="{
fontSize: '14px',
padding: '8px',
border: `1px solid ${styleScheme.primaryColor}` ,
outline: 'none',
backgroundColor: 'transparent',
color: styleScheme.primaryColor,
transition: `all .3s ${styleScheme.easeInOutCubicBezier}`
}"
>Cool!< / button >
2020-02-05 13:13:48 +08:00
< / n-config-consumer >
< br >
2020-05-31 13:38:35 +08:00
< n-element as = "div" style = "overflow: auto;" v-slot = "{ styleScheme }" >
< pre
:style="{
color: styleScheme.secondaryTextColor,
transition: `color .3s ${styleScheme.easeInOutCubicBezier}`
}"
>{{ JSON.stringify(styleScheme, 0, 2) }}< / pre >
2020-02-05 13:13:48 +08:00
< / n-element >
```