vdom-kv-form
v0.0.8
Published
virtual-dom component for an editable list of keys and values
Downloads
17
Maintainers
Readme
vdom kv form
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);