# j-KeyValue

> A simple component for create key/value pairs values.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 41a10b482b547525c9ae32155f9658defd0d06d5e8f050603989b2710a1e29a1
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

A simple component for create key/value pairs values.


__Configuration__:

- `placeholderkey {String}` a placeholder for the key input
- `placeholdervalue {String}` a placeholder for the value input
- `icon {String}` a label icon without `ti-`
- `maxlength {Number}` max. lenght for inputs
- `label {String}` a label (default: `innerHTML`)
- `disabled {Boolean}` can disabled this control
- `autocomplete {String}` a link to `function(input, component)` which is executed when an `input` is focused

__Other functionality__

```javascript
// Binder
SETTER('keyvalue/binder', function(type, value) {
    if (type === 'key')
        return value.toUpperCase();
    else // type === 'value'
        return value;
});
```

Use it with `<ui-component name="keyvalue">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<ui-component name="keyvalue" path="keyvalue" config="placeholderkey:Type a key;placeholdervalue:Type a value and press enter">Key Value component</ui-component>

<script>
	var keyvalue = {};
</script>
```
