Reusable Vuejs Form Elements That Renders with Bootstrap 4

Reusable Vuejs Form Elements That Renders with Bootstrap 4

processmaker/vue-form-elements Reusable Vuejs Form Elements That Renders with Bootstrap 4

processmaker/vue-form-elements

Reusable VueJS form elements that renders with Bootstrap 4

Summary

This is a collection of simple and rich form elements that can be bound to a parent VueJS component utilizing v-model. If you are using Bootstrap 4, then the rendering of these elements will be easy to use and fit right into your html rendering.

Preview

If you want to preview the elements in action, clone the github repository and run the npm run serve target. The vue-cli project will launch locally and you'll be able to play with each of the form elements.

Example Usage For All Form Elements

// Bring in the Javascript Distribution
import Vue from 'vue'
import VueFormElements from '@processmaker/vue-form-elements'

Vue.use(VueFormElements)

Using the above, the components are globally registered with VueJS.

Example Usage For Single Form Element (Using Single File Components)

import {FormInput, FormSelect} from '@processmaker/vue-form-elements'

new Vue({
    el: '#example',
    components: {
        FormInput
    }
})

Components

FormInput

Renders an input field, allowing types of text, password, email, search, date, datetime-local

FormCheckbox

Renders a checkbox field, allowing the grouping of checkboxes by passing in a name property.

FormRadioButtonGroup

Renders a radio button group, passing in options through a property.

FormSelect

Renders a select field with options being passed in through a property.

FormTextArea

Renders a textarea field

Field Parameters

The following are parameters used in the components to configure it

v-model (required)

Provides two-way binding to a variable.

name (required)

Specify the name of the field. This is used for certain operations and for labeling when used with validation rules.

type (optional for input type)

Specifies the type for the input field. This can be text(default) or password or any other html5 supported type.

options (required for select and radio button group)

An array of objects that represents possible options for the field. Each object contains two properties. 'content' is the text label of the option. 'value' is the value that will be assigned if the option is selected.

error (optional)

An optional error to render with the field.

rows (optional, for textarea field)

The number of rows to provide input for the textarea control.

Other properties may exist. Refer to the source code of the control to see what additional properties are available.

Validation

Validation is performed by the https://github.com/skaterdav85/validatorjs library in order to resemble the functionality of Laravel validation rules. Please see this repository for more information on applicable rules.

Validation Parameters

  • validation: string representation of the validation rules
  • validationData: a reference to a data model to validate against. Useful if you are using rules that reference other properties
  • validationMessages: A custom map of validation messages to use if defaults are not wanted (ex: translations). See validatorjs repository for the formatting of this parameter.

Download Details:

Author: ProcessMaker

Source Code: https://github.com/ProcessMaker/vue-form-elements

vue vuejs javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

8 Popular Websites That Use The Vue.JS Framework

In this article, we are going to list out the most popular websites using Vue JS as their frontend framework. Vue JS is one of those elite progressive JavaScript frameworks that has huge demand in the web development industry. Many popular websites are developed using Vue in their frontend development because of its imperative features.

Vue Native is a framework to build cross platform native mobile apps using JavaScript

Vue Native is a framework to build cross platform native mobile apps using JavaScript. It is a wrapper around the APIs of React Native. So, with Vue Native, you can do everything that you can do with React Native. With Vue Native, you get

How to Make a Simple Vue Custom Select Component

In this article, you’ll learn how to build a Vue custom select component that can be easily be styled using your own CSS. In fact, it’s the same component that we use in production on Qvault, and you can see it in action on the playground.

Creating a Custom Tooltip Component in Vue

There are plenty of libraries out there that will have you up and running with a good tooltip solution in minutes. However, if you are like me, you are sick and tired of giant dependency trees that have the distinct possibility of breaking at any time.

Vue ShortKey plugin for Vue.js

Vue-ShortKey - The ultimate shortcut plugin to improve the UX .Vue-ShortKey - plugin for VueJS 2.x accepts shortcuts globaly and in a single listener.