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 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-formly-buefy

v1.1.0

Published

Simple way to validate input data in your forms.

Downloads

34

Readme

vue-formly-buefy

Vue.js plugin that covers the Buefy form fields for Formly. It lets you to validate input data in your forms. The plugin combine simplicity of the Formly form builder, lightness of the Buefy form fields and impeccability of the Bulma design.

Brief description of the most meaningful features:

  • Completely covered. All Buefy form fields are covered (Autocomplete, Checkbox, Datepicker, Input, Radio, Select, Switch, Taginput, Timepicker and Upload).
  • Extensible. Wrap the vast majority of form elements to increase its functionality (data validation, field controls, grouping and many more are available).
  • Straightforward. Simple and standardized API.

Requirements

The plugin was developed and tested for the following packages:

Installation

First of all install necessary dependencies (see above) and vue-formly-buefy itself:

$ npm i vue-formly-buefy

After, integrate the plugin with your project:

import Buefy from 'buefy'
import Vue from 'vue'
import VueFormly from 'vue-formly'
import VueFormlyBuefy from 'vue-formly-buefy'

Vue.use(Buefy)
Vue.use(VueFormly)
Vue.use(VueFormlyBuefy) // Plug in directly after Vue Formly

new Vue({
  el: '#app'
})

That's all :D

Getting started

Look at the following example of the wrapped input with a span control:

<template>
  <formly-form :form="form" :model="model" :fields="fields"></formly-form>
</template>

<script>
  // Import the span control from the library
  import { Span } from 'vue-formly-buefy/dist/controls'

  export default {
    data () {
      return {
        form: {},
        model: {
          email: ''
        },
        fields: [
          {
            key: 'email',
            type: 'input-with-field',  // Use a wrapper to extend functionality
            templateOptions: {
              properties: {            // Keep configuration of the element              
                'placeholder': 'Your email'
              },
              wrapper: {               // Keep configuration of the wrapper
                controls: [
                  {
                    type: Span,        // Use the Span component as a control
                    position: 'after',
                    options: {         // Keep configuration of the control
                      label: '@gmail.com',
                      properties: {
                        'class': 'button is-static'
                      }
                    }
                  }
                ]
              }
            }
          }
        ]
      }
    }
  }
</script>

The code above will generate the following Buefy markup (then Vue.js will have compiled this markup to HTML as expected):

<b-field>
    <b-input placeholder="Your email"></b-input>
    <div class="control">
        <span class="button is-static">@gmail.com</span>
    </div>
</b-field>

Search for more examples here.

Documentation

Check wiki section of this repo for detailed API explanation.

Copyright and License

Copyright (c) 2017-2019 Yurii Rabeshko. Code released under the MIT license.