vue-flow-form-rate-v1
Create conversational conditional-logic forms with Vue.js.
677
| Install | |
|---|---|
npm install vue-flow-form-rate-v1 |
|
| Latest Version: | 1.0.29 |
| Vue: | 2 |
| License: | MIT |
| Last Updated: | May 11, 2022 |
| Links: | npm |
Maintainer: bracketslab
Vue Flow Form
Create conversational conditional-logic forms with Vue.js.
Live Demos
Project Documentation
Example Project
Requirements:
After checking the prerequisites, follow these simple steps to install and use Vue Form:
# clone the repo
$ git clone https://github.com/ditdot-dev/vue-flow-form.git myproject
# go into app's directory and install dependencies:
$ cd myproject
If you use npm:
$ npm install
# serve with hot reload at localhost:8080 by default.
$ npm run serve
# build for production
$ npm run build
If you use yarn:
$ yarn install
# serve with hot reload at localhost:8080 by default.
$ yarn serve
# build for production
$ yarn build
Made with Vue.js
Usage as npm package
If you don't already have an existing Vue project, the easiest way to create one is to use Vue CLI:
$ npm install -g @vue/cli
# OR
$ yarn global add @vue/cli
And then create a project (refer to Vue CLI documentation and issue tracker for potential problems on Windows):
$ vue create my-project
$ cd my-project
To add Vue Flow Form as a dependency to your Vue project, use the following:
$ npm install @ditdot-dev/vue-flow-form --save
And then in your App.vue file:
<template>
<flow-form v-bind:questions="questions" v-bind:language="language" />
</template>
<script>
// Import necessary components and classes
import FlowForm, { QuestionModel, QuestionType, ChoiceOption, LanguageModel } from '@ditdot-dev/vue-flow-form'
export default {
name: 'example',
components: {
FlowForm
},
data() {
return {
language: new LanguageModel({
// Your language definitions here (optional).
// You can leave out this prop if you want to use the default definitions.
}),
questions: [
// QuestionModel array
new QuestionModel({
title: 'Question',
type: QuestionType.MultipleChoice,
options: [
new ChoiceOption({
label: 'Answer'
})
]
})
]
}
}
}
</script>
<style>
/* Import Vue Flow Form base CSS */
@import '~@ditdot-dev/vue-flow-form/dist/vue-flow-form.css';
/* Import one of the Vue Flow Form CSS themes (optional) */
@import '~@ditdot-dev/vue-flow-form/dist/vue-flow-form.theme-minimal.css';
/* @import '~@ditdot-dev/vue-flow-form/dist/vue-flow-form.theme-green.css'; */
/* @import '~@ditdot-dev/vue-flow-form/dist/vue-flow-form.theme-purple.css'; */
</style>
Usage with plain JavaScript via CDN
HTML:
<html>
<head>
<!-- Requires Vue version 2.6.x -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.11/vue.min.js"></script>
<!-- Flow Form -->
<script src="https://unpkg.com/@ditdot-dev/vue-flow-form@1.1.7"></script>
<!-- Flow Form base CSS -->
<link rel="stylesheet" href="https://unpkg.com/@ditdot-dev/vue-flow-form@1.1.7/dist/vue-flow-form.min.css">
<!-- Optional theme.css -->
<link rel="stylesheet" href="https://unpkg.com/@ditdot-dev/vue-flow-form@1.1.7/dist/vue-flow-form.theme-minimal.min.css">
<!-- Optional font -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;900&display=swap">
</head>
<body>
<div id="app">
<flow-form v-bind:questions="questions" v-bind:language="language" />
</div>
<script src="app.js"></script>
</body>
</html>
JavaScript (content of app.js):
var app = new Vue({
el: '#app',
data: function() {
return {
language: new FlowForm.LanguageModel({
// Your language definitions here (optional).
// You can leave out this prop if you want to use the default definitions.
}),
questions: [
new FlowForm.QuestionModel({
title: 'Question',
type: FlowForm.QuestionType.MultipleChoice,
options: [
new FlowForm.ChoiceOption({
label: 'Answer'
})
]
})
]
}
}
});
Changelog
Changes for each release are documented in the release notes.
License
MIT license.
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.29 | ^2.6.11 | MIT | |
| 1.0.28 | ^2.6.11 | MIT | |
| 1.0.27 | ^2.6.11 | MIT | |
| 1.0.26 | ^2.6.11 | MIT | |
| 1.0.25 | ^2.6.11 | MIT | |
| 1.0.23 | ^2.6.11 | MIT | |
| 1.0.22 | ^2.6.11 | MIT | |
| 1.0.21 | ^2.6.11 | MIT | |
| 1.0.20 | ^2.6.11 | MIT | |
| 1.0.19 | ^2.6.11 | MIT | |
| 1.0.18 | ^2.6.11 | MIT | |
| 1.0.17 | ^2.6.11 | MIT | |
| 1.0.16 | ^2.6.11 | MIT | |
| 1.0.15 | ^2.6.11 | MIT | |
| 1.0.14 | ^2.6.11 | MIT | |
| 1.0.13 | ^2.6.11 | MIT | |
| 1.0.12 | ^2.6.11 | MIT | |
| 1.0.11 | ^2.6.11 | MIT | |
| 1.0.10 | ^2.6.11 | MIT | |
| 1.0.9 | ^2.6.11 | MIT | |
| 1.0.8 | ^2.6.11 | MIT | |
| 1.0.7 | ^2.6.11 | MIT | |
| 1.0.6 | ^2.6.11 | MIT | |
| 1.0.5 | ^2.6.11 | MIT | |
| 1.0.4 | ^2.6.11 | MIT | |
| 1.0.3 | ^2.6.11 | MIT | |
| 1.0.2 | ^2.6.11 | MIT | |
| 1.0.1 | ^2.6.11 | MIT | |
| 1.0.0 | ^2.6.11 | MIT |