0.0.8 • Published 8 years ago

vdom-kv-form v0.0.8

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

vdom kv form

demo

List of keys and values, easily editable with keyboard navigation. It's made with virtual-dom and compatible with mercury component interface.

install

$ npm install vdom-kv-form

example

var vdom = require('virtual-dom');
var h = vdom.h;
var Form = require('vdom-kv-form');

var state = Form({
  rows: [
    {
      field: 'my field',
      value: 'my value'
    }
  ]
});

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