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

Commit 3c18866

Browse files
committed
docs: add plugin-options page
1 parent a186787 commit 3c18866

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

docs/.vitepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ function getSetupSidebar() {
4141
children: [
4242
{ text: 'Chakra UI Vue', link: '/' },
4343
{ text: 'Getting Started', link: '/guides/getting-started' },
44+
{ text: 'Plugin Options', link: '/pages/getting-started/plugin-options' },
4445
{ text: 'Style Props', link: '/pages/getting-started/style-props' }
4546
]
4647
},
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Plugin Options
2+
3+
Chakra UI's plugin gives you the ability to extend Chakra's features for your application.
4+
Here are all the options available when configuring the plugin and their default values:
5+
6+
```js
7+
import ChakraUIVuePlugin, { extendTheme } from '@chakra-ui/vue-next'
8+
9+
Vue.use(ChakraUIVuePlugin, {
10+
/**
11+
* Extends the Chakra theme object with the values
12+
* provided in this option. Chakra UI recursively merges this
13+
* theme object and will overwrite defaults with extended theme
14+
* values.
15+
*
16+
* @see
17+
* - Theme specification - https://theme-ui.com/theme-spec/
18+
* - Example:
19+
* TODO: Link to docs extendTheme
20+
*/
21+
extendTheme: extendTheme({}),
22+
/**
23+
* Enables extension of icons inside the Chakra app.
24+
*
25+
* @see
26+
* - Icons: https://next.vue.chakra-ui.com/icon
27+
*/
28+
icons: {
29+
/**
30+
* The pack of the icons being used.
31+
* This defaults to FontAwesome (fa).
32+
*/
33+
iconPack: 'fa',
34+
/**
35+
*The object of icon paths to be consumed.
36+
* For example:
37+
* - faArrowUp
38+
* - faArrowDown
39+
*/
40+
iconSet: {},
41+
/**
42+
* Custom SVG paths that can be added to the
43+
* Chakra application and can be accessed by Chakra.
44+
* Chakra defaults all SVG icon paths 'viewBox' to `0 0 24 24`.
45+
*
46+
* e.g.
47+
* extend: {
48+
* github: {
49+
* path: `<path ...> </path>`,
50+
* viewbox: `0 0 24 24`
51+
* }
52+
* }
53+
*
54+
* @see
55+
* - Icons: https://next.vue.chakra-ui.com/icon
56+
*/
57+
extend: {},
58+
}
59+
})
60+
61+
```

0 commit comments

Comments
 (0)