Element: <ins-input-stepper>
Defines an input field where user can enter data or use the -, + buttons to update the value.
Code Snippet
<ins-input-stepper value="50" step="10" min="10" max="100"> </ins-input-stepper>
Code Snippet
<ins-input-stepper value="50" step="10" min="10" max="100" tooltip="This is a sample tooltip content. It also support html content."> </ins-input-stepper>
Code Snippet
<ins-input-stepper></ins-input-stepper>
Code Snippet
<ins-input-stepper id="dsv"> </ins-input-stepper> <script> var dsv = document.getElementById('dsv'); dsv.addEventListener('didLoad', function(e){ dsv.value = '100'; }); </script>
Code Snippet
<ins-input-stepper value="200" label="Name"> </ins-input-stepper>
Code Snippet
<ins-input-stepper label="Disabled" disabled> </ins-input-stepper>
Code Snippet
<ins-input-stepper label="Read Only" readonly> </ins-input-stepper>
Code Snippet
<ins-input-stepper has-error label="Quantity" error-message="Please enter quantity"> </ins-input-stepper>
Code Snippet
<ins-input-stepper id="insInput"> </ins-input-stepper> <p id="demo"></p> <script> const insInput = document.getElementById('insInput') insInput.addEventListener('insInput', event => { console.log(event.detail.value); console.log(event.detail.validated); console.log(event.detail.keyCode); document.getElementById("demo").innerHTML = event.detail.validated; }); </script>
Code Snippet
<ins-input-stepper id="valueChange" placeholder="Email" label="Email" field="email" icon="icon-mail"> </ins-input-stepper> <p id="demo"></p> <script> const valueChange = document.getElementById('valueChange') valueChange.addEventListener('valueChange', event => { console.log(event.detail); document.getElementById("demo").innerHTML = event.detail; }); </script>
FIELD ATTRIBUTE | TYPE | DEFAULT | OPTIONS | DESCRIPTION |
---|---|---|---|---|
value | number | 0 | any | Defines value of input field |
label | string | "" | any | Defines label of input field |
name | string | "" | any | Defines name of input field |
min | string | "" | any | Defines min attribute value of the input field (for field type number) |
max | string | "" | any | Defines max attribute value of the input field (for field type number) |
step | string | "" | any | Defines increment value of the input field (for field type number) |
required | boolean | false | true, false | Specifies that the input field must be filled out before submitting the form |
disabled | boolean | false | true, false | Disables input field |
readonly | boolean | false | true, false | Specifies that the input field is read-only |
has-error | boolean | false | true, false | Specifies validation or mandatory input for the input field |
error-message | string | "" | any | Defines the error message when input element is wrong |
tooltip | string | "" | - | Displays a tooltip beside the label. Supports HTML Content |
EVENT | OBJECT | DESCRIPTION |
---|---|---|
insValueChange | value | Returns value when an element gets user input |
insBlur | value, keycode | Emit field value and keycode on input blur event |
Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.