Chakra UI Module for Nuxt.js
@chakra-ui/nuxt dependency to your projectyarn add @chakra-ui/nuxt @nuxtjs/emotion
@chakra-ui/nuxt & @nuxtjs/emotion to the modules section of nuxt.config.js// nuxt.config.js
export default {
modules: [
'@chakra-ui/nuxt',
'@nuxtjs/emotion'
],
/**
* Add extend the plugin options under the `chakra` key.
**/
chakra: {
extendTheme: {
colors: {
brand: { /* ... */ }
}
}
}
}
layouts/ directory inside CThemeProvider as seen in the Chakra UI docs to start consuming Chakra Components. Like so:<template>
<c-theme-provider>
<c-reset/>
<nuxt/>
</c-theme-provider>
</template>
<script>
import {
CThemeProvider,
CReset,
CButton
} from "@chakra-ui/vue";
export default {
name: 'DefaultLayout',
components: {
CThemeProvider,
CReset,
}
};
</script>
yarn bootstrapyarn devCopyright (c) Kelvin Omereshone kelvinomereshone@gmail.com