j-Enterbox
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}iconplaceholder {String}a placeholder for the input controlexec {String}optional, a link to a function in the window scope (otherwisedata-jc-pathis 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.
<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>