vdom-form-field

Easy form fields with virtual-dom.

Usage no npm install needed!

<script type="module">
  import vdomFormField from 'https://cdn.skypack.dev/vdom-form-field';
</script>

README

vdom form field

Easy form fields with virtual-dom.

install

$ npm install vdom-form-field

example

var vdom = require('virtual-dom');
var h = vdom.h;
var FormField = require('vdom-form-field');

var state = FormField({
  field: 'example'
});

var loop = require('main-loop')( state(), FormField.render, vdom );
state(loop.update);
document.getElementById('content').appendChild(loop.target);