PrimeVue (v4, v3) support for the FormKit validation Framwork
PrimeVue based FormKit Inputs for using FormKit with the PrimeVue UI Framework.
Main focus of this project is to provide configuration based forms with validation.
In addition, you can use the same pattern for data output from schema using PrimeOutputs.
Actual PrimeVue Version of the main branch is 4.x.
PrimeVue 3 is in the prime3 branch, but future development will only focus on PrimeVue 4
Add formkit.config.ts
import { defaultConfig, plugin } from '@formkit/vue'
import { primeInputs } from '@sfxcode/formkit-primevue'
app.use(plugin, defaultConfig({
locales: { de, en },
// Define the active locale
locale: 'en',
inputs: primeInputs,
}))
or if using also the output part
import { defaultConfig, plugin } from '@formkit/vue'
import { primeInputs, primeOutputs } from '@sfxcode/formkit-primevue'
app.use(plugin, defaultConfig({
locales: { de, en },
// Define the active locale
locale: 'en',
inputs: { ...primeInputs, ...primeOutputs },
}))
Important: output elements depends on vue-i18n to style numbers, dates, …
FormKit-PrimeVue-Nuxt module available.
Features:
Prefixing of the PrimeVue component names is not supported.
useFormKitSchema provide functions to simplify the usage of elements, components, lists, …
useInputEditorSchema provide functions for a component schema generation builder
Basic styling is provided with the formkit-primevue.scss file or the corresponding css file in the package.
Features:
You can use it or take it as base for your own styling.
Some samples for common tasks are available
Nuxt 3 PrimeVue Starter and Vite PrimeVue Starter with Formkit support available.