@chakra-ui/nuxt
v0.7.1
Published
Chakra UI Module for Nuxt.js
Downloads
134
Readme
Chakra UI Module for Nuxt.js
Looking for documentation?
Setup
- Add
@chakra-ui/nuxtdependency to your project
yarn add @chakra-ui/nuxt @nuxtjs/emotion- Add
@chakra-ui/nuxt&@nuxtjs/emotionto themodulessection ofnuxt.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: { /* ... */ }
}
}
}
}- Wrap your default layout in
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>Development
- Clone this repository
- Install dependencies using
yarn bootstrap - Start development server using
yarn dev
License
Copyright (c) Kelvin Omereshone [email protected]
