npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue-reform

v1.1.0

Published

Flexible form abstraction for Vue, inspired by Formik

Readme

vue-reform

Simplify your Vue.js forms with wired-up form components that are easy to extend.

Inspired by Formik.

Features

  • keeps track of form's state (values, validation, etc.)
  • reduces the boilerplate
  • plug'n'play with custom components

Notice: vue-reform uses vee-validate under the hood for form and field validation.

Getting started

Install the library with NPM

npm install --save vue-reform

Register the library globally

import VueReform from 'vue-reform';

Vue.use(VueReform);

or import components locally

import { FormControl, FormField } from 'vue-reform';

FormField defaults to input component so you can start to build your form right away

<template>
  <form-control @submit="doFormAction">
    <form-field
      name="firstName"
      label="First name"
      placeholder="First name" />
    <form-field
      name="lastName"
      label="Last name"
      rules="required"
      placeholder="Last name" />
    <form-field
      name="email"
      label="Email"
      rules="required|email"
      placeholder="Last name" />
  </form-control>
</template>

Components

Form

form element with bounded FormControl's submit listener.

Props

  • initialValues: Object - used to initialize form data

Events

submit

Parameters:

  • values: { [name]: value }

invalid

Parameters:

  • errors: { [name]: message }
  • values: { [name]: value }

FormField

Automatically binds Form or FormControl value and errors based on the name prop.

Props

  • name: String - used to automatically bind FormControl state values to field (value, errors, field meta data)
  • label: String (optional) - label associated with the field's form control element
  • placeholder: String (optional) - placeholder for the default input field
  • vee-validate's validation-provider props

Slots

label, icon, input, error

All slots receive following props:

  • value: [String, Number] - field value, bound through the name prop
  • errors: String[] - field errors
  • on: { [event]: listener } - event listeners map that should be attached to a form element

FormControl

Top-level form component that keeps track of form's state. Form fields are passed using the default slot. Emits submit event with formBag argument.

Props

  • initialValues: Object - used to initialize form data

Events

submit

Parameters:

  • values: { [name]: value }

invalid

  • errors: { [name]: message }
  • values: { [name]: value }

Slots

default

Props:

Custom styling

All elements rendered by vue-reform components are given prefixed helper classes that can be targeted.

Here's a list per component:

  • FormControl: reform-form-control
  • Form: reform-form
  • FormField:
    • root element: reform-field
    • label wrapper element: reform-invalid, reform-dirty, reform-required, reform-changed, reform-touched, reform-pending
    • control wrapper element: reform-control
    These are optional as they're given to the default slots:
    • label: reform-label
    • default input control element: reform-input
    • error message: reform-error