npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue3-form-generator

v1.0.17

Published

A schema-based form generator component for Vue3.js. Original repo: https://github.com/vue-generators/vue-form-generator

Downloads

884

Readme

vue3-form-generator NPM version VueJS v2.x compatible

A schema-based form generator component for Vue3.js. Original repo: https://github.com/vue-generators/vue-form-generator

Build Status Coverage Status NPMS.io score Package Quality Downloads

Demo

Screenshot

Features

  • Supports VUE3
  • reactive forms based on schemas
  • multiple object editing
  • 21 field types
  • built-in validators
  • core & full bundles (41kb and 50kb gzipped)
  • Bootstrap friendly templates
  • customizable styles
  • can be extended easily with custom fields
  • ...etc

Documentation

Online documentation on Gitbook

Dependencies

vue-form-generator uses fecha and lodash internally.

While built-in fields don't need external dependencies, optional fields may need other libraries. These dependencies fall into two camps: jQuery or Vanilla. You can find almost the same functionality in both flavors. In the end, it's your choice to depend on jQuery or not.

You can find details about dependencies in the official documentation under each specific component.

Installation

NPM

You can install it via NPM.

Latest version for Vue 3.x

$ npm install vue3-form-generator

Usage


<template>
    <div class="panel-body">
        <vue-form-generator :schema="schema" :model="model" :options="formOptions"></vue-form-generator>
    </div>
</template>

<script>
    import VueFormGenerator from 'vue3-form-generator'
    import 'vue3-form-generator/dist/vfg.css'

    export default {
        data() {
            return {
                model: {
                    id: 1,
                    name: 'John Doe',
                    password: 'J0hnD03!x4',
                    skills: ['Javascript', 'VueJS'],
                    email: '[email protected]',
                    status: true
                },
                schema: {
                    fields: [
                        {
                            type: 'input',
                            inputType: 'text',
                            label: 'ID (disabled text field)',
                            model: 'id',
                            readonly: true,
                            disabled: true
                        },
                        {
                            type: 'input',
                            inputType: 'text',
                            label: 'Name',
                            model: 'name',
                            placeholder: 'Your name',
                            featured: true,
                            required: true
                        },
                        {
                            type: 'input',
                            inputType: 'password',
                            label: 'Password',
                            model: 'password',
                            min: 6,
                            required: true,
                            hint: 'Minimum 6 characters',
                            validator: VueFormGenerator.validators.string
                        },
                        {
                            type: 'select',
                            label: 'Skills',
                            model: 'skills',
                            values: ['Javascript', 'VueJS', 'CSS3', 'HTML5']
                        },
                        {
                            type: 'input',
                            inputType: 'email',
                            label: 'E-mail',
                            model: 'email',
                            placeholder: 'User\'s e-mail address'
                        },
                        {
                            type: 'checkbox',
                            label: 'Status',
                            model: 'status',
                            default: true
                        }
                    ]
                },
                formOptions: {
                    validateAfterLoad: true,
                    validateAfterChanged: true,
                    validateAsync: true
                }
            }
        }
    }
</script>

Development

This command will start a webpack-dev-server with content of dev folder.

npm run dev

Build

This command will build a distributable version in the dist directory.

npm run build

Test

npm test

or

npm run ci

More fields new

VueFormGenerator supports custom fields. If you decide to release your custom field into the wild, please open a new issue so we can add you to a list here! Please try to use this naming convention for your custom field : vfg-field-* Example :

  • vfg-field-myfield
  • vfg-field-calendar
  • vfg-field-awesome-dropdown

This way, it will be easier for everyone to find it. Thank you !

Public Custom Fields

Contribution

Please send pull requests improving the usage and fixing bugs, improving documentation and providing better examples, or providing some testing, because these things are important.

License

vue-form-generator is available under the MIT license.

vue3-form-generator is available under the MIT license.

Contact

Copyright (C) 2017 Icebob

@icebob @icebob Vue2

@nick7dam Vue 3