# vue-inputs

> Bootstrap 4 VueJS form elements with validator

Latest version **0.1.2** (published 2018-12-12) · 0 weekly downloads

## Install

```sh
npm install vue-inputs
pnpm add vue-inputs
yarn add vue-inputs
bun add vue-inputs
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2018-12-12 |
| First published | 2018-12-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 32.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tadas Maslauskas |
| Maintainers | maslauskas |
| Keywords | vue, vue.js, vue-forms, vue-inputs, form, input, component |

## Links

- npm: https://www.npmjs.com/package/vue-inputs
- Repository: https://github.com/western-investment/vue-inputs
- Homepage: https://github.com/western-investment/vue-inputs#readme
- Issues: https://github.com/western-investment/vue-inputs/issues
- npm.io page: https://npm.io/package/vue-inputs

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2018-12-12
- 0.1.1 — 2018-12-12
- 0.1.0 — 2018-12-12

## README

## Menu

- [Introduction](#Introduction)
- [Usage](#usage)
- [Components](#components)
    - [Input](#input)
    - [Select](#select)
    - [Textarea](#textarea)
    - [Checkbox](#checkbox)
    - [Radio](#radio)

## Introduction

Vue Inputs is a package that bundles common form inputs using Bootstrap 4 framework. Each component acts as a wrapper, making it much easier to use form elements without the need to repeat labels, validation and other classes, help blocks.

## Installation

```bash
npm install vue-inputs --save
```

## Usage

Including this plugin in your VueJS application is very simple. This will register all available components globally, so you can use them anywhere in your application.

```javascript
import FormInputs from 'vue-inputs'

Vue.use(FormInputs)
```

## Components

All components have validator injected into them from parent component, so you don't need to worry about checking for errors. If error with same name as `name` property is found, validation error will be show on component.

###### Available props

** Prop **|** Types **|** Default **|** Description **
-----|-----|-----|-----|
label | String, Boolean| - | Label to show on the input. If `false`, label is not shown.
name | String | - | Input's name
value | any | - | Automatically injected when using `v-model`
inline | Boolean | `false` | Show label and input inline
input-group | Boolean | `false` | Show input group addon. Makes slot `input-group-append` available. (`form-input` only)
options | Array | - | Options for select (`form-select` only)
id | String | auto generated | ID (`form-checkbox` and `form-radio` only)

#### Input

```javascript
<form-input
    label="First Name"
    name="first_name"
    v-model="user.firstName"
></form-input>
```

#### Select

```javascript
<form-select
    label="Role"
    name="role_id"
    v-model="user.roleId"
    :options="roles"
></form-select>
```
Select component accepts array of objects as options:

```javascript
roles: [
  { text: 'Select Role', value: null },
  { text: 'Administrator', value: 1 },
  { text: 'Subscriber', value: 2 }
]
```

#### Textarea

```javascript
<form-textarea
    label="Content"
    name="content"
    v-model="post.content"
></form-textarea>
```

#### Checkbox

```javascript
<form-checkbox
    label="I agree to terms and conditions"
    name="terms_and_conditions"
    v-model="user.terms_and_conditions"
></form-checkbox>
```

#### Radio

```javascript
<form-radio
    label="Blue"
    name="color"
    value="blue"
    v-model="product.color"
></form-radio>
```

---
_Source: https://npm.io/package/vue-inputs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
