File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,33 @@ That's it! You can now use FormKit PrimeVue Nuxt Module in your Nuxt app ✨
3535- ** formkitPluginAnimate** (default: ` true ` ): Enable FormKit animate plugin (Only hen formkitAutoConfig is ` true ` ).
3636- ** formkitPluginAsterisk** (default: ` true ` ): Enable FormKit asterisk plugin (Only hen formkitAutoConfig is ` true ` ).
3737
38+ ### Custom Global FormKit Configuration
39+
40+ You can also provide a custom FormKit configuration by adding the following configuration to your ` nuxt.config.ts ` :
41+
42+ ``` ts
43+ formkitPrimevue : {
44+ formkitAutoConfig : false
45+ }
46+ ```
47+
48+ and creating a custom nuxt plugin in the ` plugins ` directory:
49+
50+ for example ` plugins/formkit.ts ` :
51+ ``` ts
52+ import { defaultConfig , plugin } from ' @formkit/vue'
53+ import { primeInputs , primeOutputs } from ' @sfxcode/formkit-primevue'
54+
55+ export default defineNuxtPlugin ((nuxtApp ) => {
56+ // Doing something with nuxtApp
57+ const app = nuxtApp .vueApp
58+ app .use (plugin , defaultConfig ({
59+ inputs: { ... primeInputs , ... primeOutputs },
60+ // ... additional configurations like locales, plugins, custom validations etc.
61+ }))
62+ })
63+
64+ ````
3865## Additional Configuration
3966
4067For i18n support , you can add the following configuration to your ` nuxt.config.ts ` :
You can’t perform that action at this time.
0 commit comments