# j-Enterbox

> A simple EnterBox. Each value needs to be confirmed via enter key or clicking on the button.

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

A simple EnterBox. Each value needs to be confirmed via `enter` key or clicking on the button.


__Configuration__:

- `maxlength {Number}` optional, a maximum length of value (default: `50`)
- `icon {String}` icon
- `placeholder {String}` a placeholder for the input control
- `exec {String}` optional, a link to a function in the window scope (otherwise `data-jc-path` is required)
- `button {String}` adds a label to the button (default: `empty`)

Use it with `<ui-component name="enterbox">`. 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
<div style="padding:50px;max-width:300px">
	<ui-component name="enterbox" config="exec:enterbox_enter;icon:ti ti-search;placeholder:Search and press enter ..."></ui-component>
</div>

<script>
	function enterbox_enter(value) {
		alert(value);
	}
</script>
```
