Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit f83a9b9

Browse files
Merge pull request #321 from carwack/patch-1
docs: update icon.mdx with Nuxt.js option
2 parents ebd36df + aee016a commit f83a9b9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

website/pages/icon.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,34 @@ Vue.use(Chakra, {
9595
})
9696
```
9797

98+
### In Nuxt.js
99+
In your `nuxt.config.js` file import the icons you wish to use and add them to the Chakra module options.
100+
```js
101+
// Import FontAwesome icons
102+
import { faGlobeAfrica, faEnvelope } from '@fortawesome/free-solid-svg-icons'
103+
104+
export default {
105+
...
106+
modules: [
107+
'@chakra-ui/nuxt',
108+
'@nuxtjs/emotion'
109+
],
110+
chakra: {
111+
icons: {
112+
// Here we state that we use `fa`
113+
// icons library for Chakra's
114+
// internal icon parser
115+
iconPack: 'fa',
116+
iconSet: {
117+
faGlobeAfrica,
118+
faEnvelope
119+
}
120+
}
121+
}
122+
...
123+
}
124+
```
125+
98126
## Adding custom icons
99127

100128
All Chakra icons are registered in the Chakra plugin under the `icons.extend` key. So you

0 commit comments

Comments
 (0)