# Installation

## NPM

You can install it via [NPM](http://npmjs.org/).

```
$ npm install --save vue-form-generator
```

## Manual

Download zip package, unpack and add the `vfg.css` and `vfg.js` file to your project from `/dist` folder.

```
https://github.com/vue-generators/vue-form-generator/releases/latest
```

## Import into Project

```javascript
<script>
    import Vue from 'vue';
    import VueFormGenerator from 'vue-form-generator'
    import 'vue-form-generator/dist/vfg.css'
    Vue.use(VueFormGenerator)
</script>
```

## Core vs Full version

VueFormGenerator can be setup using the 'core' or 'full' variations.

* Core is a minimal version with only half the fields. &#x20;
* Full is core + other fields.

If you don't know what to choose, don't worry, full is the default version. If you want the slimmed down version, here are the changes:

```javascript
// "core" only
<script>
    import Vue from 'vue'
    import VueFormGenerator from 'vue-form-generator/dist/vfg-core.js'
    import 'vue-form-generator/dist/vfg-core.css'
    Vue.use(VueFormGenerator)
</script>
```

## Dependencies

VueFormGenerator uses [fecha](https://github.com/taylorhakes/fecha) and [lodash](https://lodash.com/) internally.

While core fields don't require external dependencies, optional fields in the full package may need additional libraries.\
These dependencies fall into two camps: jQuery or Vanilla. You can find almost the same functionality in both flavors. That way, it's your choice to depend on jQuery or not.

| Field type           | jQuery                                                                                       | Vanilla                                                                                                  |
| -------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| Address autocomplete | N/A                                                                                          | [googleAddress](https://vue-generators.gitbook.io/vue-generators/fields/optional_fields/googleaddress)   |
| Color picker         | [spectrum](https://vue-generators.gitbook.io/vue-generators/fields/optional_fields/spectrum) | N/A                                                                                                      |
| Date picker          | [datetime](https://vue-generators.gitbook.io/vue-generators/fields/optional_fields/datetime) | [pikaday](https://vue-generators.gitbook.io/vue-generators/fields/optional_fields/pikaday)               |
| Masked Input         | [masked](https://vue-generators.gitbook.io/vue-generators/fields/optional_fields/masked)     | [cleave](https://vue-generators.gitbook.io/vue-generators/fields/optional_fields/cleave)                 |
| Multi Selection      | [selectEx](https://vue-generators.gitbook.io/vue-generators/fields/optional_fields/selectex) | [vueMultiSelect](https://vue-generators.gitbook.io/vue-generators/fields/optional_fields/vuemultiselect) |
| Slider               | [slider](https://vue-generators.gitbook.io/vue-generators/fields/optional_fields/slider)     | [noUiSlider](https://vue-generators.gitbook.io/vue-generators/fields/optional_fields/nouislider)         |

You can find details about dependencies in each field page.
