1.3.0 • Published 2 years ago

@vue-toolkit/forms v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm ci

@vue-toolkit/forms

Completely style-able, fully accessible form UI components, built with Vue.

Features

  • 🚀 Vue components with minimal styles
  • 🎉 Fully accessible
  • 🎨 Sass variables
  • 📂 BEM class names
  • 💪 Written in TypeScript

Installation

npm install --save @vue-toolkit/forms @vue-toolkit/common

Vue Toolkit requires @vue/composition-api >= v1.1

Usage

import Vue from 'vue';
import Common from '@vue-toolkit/common';
import Forms from '@vue-toolkit/forms';

Vue.use(Common);
Vue.use(Forms);

Optionally, import the minimal default Sass styles:

@import '@vue-toolkit/forms/sass/components';

Validators

A validator is a function that processes a value and returns error information or null. A null return value means that validation has passed.

Built-in Validators

import { validators } from '@vue-toolkit/forms';
ValidatorDescription
emailRequires the value pass an email validation test.
maxLengthRequires the length of the value to be less than or equal to the provided maximum length.
maxRequires the value to be less than or equal to the provided number.
minLengthRequires the length of the value to be greater than or equal to the provided minimum length.
minRequires the value to be greater than or equal to the provided number.
patternRequires the value to match a regex pattern.
requiredRequires the value to be non-empty.

Custom Validators

const mustBeAwesome = (value) => {
  return value.includes('awesome') ? null : { awesome: true };
};

Credits

@vue-toolkit/forms is a project by TSG, a full-service digital agency taking software from concept to launch. Our powerhouse team of designers and engineers build iOS, Android, and web apps across many industries.

1.3.0

2 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

1.0.0-beta.6

3 years ago

1.0.0-rc.1

3 years ago

1.0.0-beta.5

3 years ago

1.0.0-beta.4

3 years ago

1.0.0-beta.3

3 years ago

1.0.0-beta.0

3 years ago

1.0.0-beta.1

3 years ago

1.0.0-alpha.12

3 years ago

1.0.0-alpha.11

3 years ago

1.0.0-alpha.10

3 years ago

1.0.0-alpha.9

3 years ago

1.0.0-alpha.8

3 years ago

1.0.0-alpha.7

3 years ago

1.0.0-alpha.6

3 years ago

1.0.0-alpha.5

3 years ago

1.0.0-alpha.4

3 years ago

1.0.0-alpha.3

3 years ago

1.0.0-alpha.2

3 years ago

1.0.0-alpha.1

3 years ago

1.0.0-alpha.0

3 years ago

1.0.0-alpha.16

3 years ago

0.2.0

3 years ago