Easy way to dynamically create reactive forms in Vue based on a varying business object model
Easy way to dynamically create reactive forms in Vue based on a varying business object model
3.x.x Dynamic FormsImplementing handcrafted forms can be:
Especially if you need to create a very large form, in which the inputs are similar to each other, and they change frequently to meet rapidly changing business and regulatory requirements.
So, wouldn't it be more economical to create the forms dynamically? Based on metadata that describes the business object model?
That's Vue Dynamic Forms.
This is the Vue 3.x.x compatible version. Out of the box Typescript support, tree shakeable, improved accessibility and lighter in size. For Vue 2.x.x please use the library tags 2.x.
Complete documentation and examples available at
Generous Unicorns
Accesible Benevolents
$ npm install @asigloo/vue-dynamic-formsor if you prefer yarn
$ yarn add @asigloo/vue-dynamic-formsThe installation and usage has change to align with new Vue 3 plugin installation.
To create a new Dynamic Form instance, use the createDynamicForms function;
import { createApp } from 'vue'
import { createDynamicForms } from '@asigloo/vue-dynamic-forms'
const VueDynamicForms = createDynamicForms()
export const app = createApp(App)
app.use(VueDynamicForms)In your component:
We've prepared some demos to show different use cases of the library and how to use each type of input field.
To check them just run the command bellow which run the app at http://localhost:3000/
yarn run serveyarn installyarn run serveyarn run buildyarn run build:dtsyarn run lintyarn run testyarn run testIf you find this library useful and you want to help improve it, maintain it or just want a new feature, feel free to contact me, or feel free to do a PR .
This project is licensed under the MIT License - see the LICENSE.md file for details.
No open issues yet, or sync has not completed.