All Projects → asigloo → Vue Dynamic Forms

asigloo / Vue Dynamic Forms

Licence: mit
Easy way to dynamically create reactive forms in vue based on a varying business object model

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Vue Dynamic Forms

React Controlled Form
Flexible, Modular & Controlled Forms for React and Redux
Stars: ✭ 121 (-17.12%)
Mutual labels:  form-validation, forms
Formidable
PHP 7 form library for handling user input
Stars: ✭ 27 (-81.51%)
Mutual labels:  form-validation, forms
React Hook Form
📋 React Hooks for form state management and validation (Web + React Native)
Stars: ✭ 24,831 (+16907.53%)
Mutual labels:  form-validation, forms
CustomFormViews
A clean collection of views used for forms.
Stars: ✭ 12 (-91.78%)
Mutual labels:  forms, form-validation
Jafar
🌟!(Just another form application renderer)
Stars: ✭ 107 (-26.71%)
Mutual labels:  form-validation, forms
grav-plugin-form
Grav Form Plugin
Stars: ✭ 48 (-67.12%)
Mutual labels:  forms, form-validation
React Final Form
🏁 High performance subscription-based form state management for React
Stars: ✭ 6,781 (+4544.52%)
Mutual labels:  form-validation, forms
form-data-json
A zero dependency, cross browser library to easily get or set/manipulate form input values as/from a json object.
Stars: ✭ 37 (-74.66%)
Mutual labels:  forms, form-validation
Rsformview
A Cocoapods library designed to easily create forms with multiple data entry fields
Stars: ✭ 84 (-42.47%)
Mutual labels:  form-validation, forms
Use Form
Build great forms without effort. 🚀
Stars: ✭ 42 (-71.23%)
Mutual labels:  form-validation, forms
formio
Formio, form definition and binding library for Java platform
Stars: ✭ 24 (-83.56%)
Mutual labels:  forms, form-validation
Form For
ReactJS forms made easy
Stars: ✭ 118 (-19.18%)
Mutual labels:  form-validation, forms
vue-use-form
✅ A Vue.js composition API function to validate forms
Stars: ✭ 97 (-33.56%)
Mutual labels:  forms, form-validation
React Reactive Form
Angular like reactive forms in React.
Stars: ✭ 259 (+77.4%)
Mutual labels:  form-validation, forms
react-cool-form
😎 📋 React hooks for forms state and validation, less code more performant.
Stars: ✭ 246 (+68.49%)
Mutual labels:  forms, form-validation
Flutter form builder
Simple form maker for Flutter Framework
Stars: ✭ 715 (+389.73%)
Mutual labels:  form-validation, forms
FrontendForms
A module for ProcessWire CMS to create and validate forms on the frontend easily using the Valitron library.
Stars: ✭ 0 (-100%)
Mutual labels:  forms, form-validation
ember-validity-modifier
Ember Octane addon to add custom validity (form validation) to form fields
Stars: ✭ 28 (-80.82%)
Mutual labels:  forms, form-validation
Usetheform
React library for composing declarative forms, manage their state, handling their validation and much more.
Stars: ✭ 40 (-72.6%)
Mutual labels:  form-validation, forms
React Forms
React library for rendering forms.
Stars: ✭ 111 (-23.97%)
Mutual labels:  form-validation, forms

Library Banner

Vue 3.x.x Dynamic Forms

Current npm version Minified size Vue.js version

Implementing handcrafted forms can be:

  1. Costly
  2. Time-consuming

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.

Status: Stable

This is the Vue 3.x.x compatible version. Out of the box Typescript support, three shakeable, improved accesiility and be lighter in size. For Vue 2.x.x please use the library tags 2.x.

Documentation

Complete documentation and examples available at

Installation

$ npm install @asigloo/vue-dynamic-forms

or if you prefer yarn

$ yarn add @asigloo/vue-dynamic-forms

Usage

The 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:

<template>
  <dynamic-form :form="form" @change="valueChanged" />
</template>

<script lang="ts">
import { computed, defineComponent, reactive } from 'vue';

import {
  CheckboxField,
  TextField,
  SelectField,
} from '@asigloo/vue-dynamic-forms';

export default defineComponent({
  name: 'BasicDemo',
  setup() {
    const form = ref({
      id: 'basic-demo',
      fields: {
        username: TextField({
          label: 'Username',
        }),
        games: SelectField({
          label: 'Games',
          options: [
            {
              value: 'the-last-of-us',
              label: 'The Last of Us II',
            },
            {
              value: 'death-stranding',
              label: 'Death Stranding',
            },
            {
              value: 'nier-automata',
              label: 'Nier Automata',
            },
          ],
        }),
        checkIfAwesome: CheckboxField({
          label: 'Remember Me',
        }),
      },
    });

    function valueChanged(values) {
      console.log('Values', values);
    }

    return {
      form,
      valueChanged,
    };
  },
});
</script>

Demos

Vue Dynamic Forms Demo

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:6044/

yarn run serve
  • [x] General Form
  • [x] Text Fields
  • [x] Number Fields
  • [x] Select Fields
  • [x] Textarea Fields
  • [x] Radio Fields
  • [x] Login
  • [x] Custom Fields
  • [ ] Axios form (Retrieve form structure from an API)
  • [ ] TailwindCSS styling

Development

Project setup

yarn install

Compiles and hot-reloads

yarn run serve

Compiles and minifies for production

yarn run build

Generate types

yarn run build:dts

Lints and fixes files

yarn run lint

Run your unit tests

yarn run test

Run your e2e tests

yarn run test

Contributing

If 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 😁.

Todolist

  • [ ] Update docs

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].