Element: <ins-button>
Defines a clickable button.
Code Snippet
<ins-button></ins-button>
Code Snippet
<ins-button label="NORMAL" icon="icon-email-1" icon-right="icon-heart" solid color="blue" size="normal" tooltip="This is a sample tooltip content. It also support html content."> </ins-button>
Code Snippet
<ins-button></ins-button>
Code Snippet
<ins-button></ins-button>
Code Snippet
<ins-button id="dsv"> </ins-button> <script> var dsv = document.getElementById('dsv') dsv.addEventListener('didLoad', function(e){ dsv.label = 'Direct Set Data'; dsv.solid = true; }); </script>
Code Snippet
<ins-button label="Open" solid color="positive" size="normal"> </ins-button>
Code Snippet
<ins-button disabled solid color="negative" label="Delete"> </ins-button>
Code Snippet
<ins-button label="Label Change"> </ins-button>
Code Snippet
<ins-button color="positive"> </ins-button>
Code Snippet
<ins-button size="large"> </ins-button>
Code Snippet
<ins-button label="TEXT" color="blue" size="normal"> </ins-button>
Code Snippet
<ins-button label="NORMAL" solid color="blue" size="normal"> </ins-button>
Code Snippet
<ins-button label="OUTLINED" color="blue" outlined size="normal"> </ins-button>
Code Snippet
<ins-button label="TEXT" icon="icon-email-1" color="blue" size="normal"> </ins-button>
Code Snippet
<ins-button label="NORMAL" icon="icon-email-1" solid color="blue" size="normal"> </ins-button>
Code Snippet
<ins-button label="OUTLINED" icon="icon-email-1" color="blue" outlined size="normal"> </ins-button>
Code Snippet
<ins-button icon="icon-delete" color="grey" size="normal" label=""> </ins-button>
Code Snippet
<ins-button label="NORMAL" icon="icon-email-1" solid color="blue" size="normal" options="Option 2, Option 3"> </ins-button>
Code Snippet
<ins-button label="NORMAL" icon="icon-email-1" solid color="blue" size="normal" options="Option 2, Option 3" dropdown> </ins-button>
Code Snippet
<ins-button label="SMALL" solid color="blue" size="small"> </ins-button>
Code Snippet
<ins-button label="LARGE" solid color="blue" size="large"> </ins-button>
Code Snippet
<ins-button label="TEXT" color="primary" size="normal"></ins-button> <ins-button label="NORMAL" solid color="primary" size="normal"></ins-button> <ins-button label="OUTLINED" color="primary" outlined size="normal"></ins-button>
Code Snippet
<ins-button label="TEXT" color="positive" size="normal"> </ins-button> <ins-button label="NORMAL" solid color="positive" size="normal"> </ins-button> <ins-button label="OUTLINED" color="positive" outlined size="normal"></ins-button>
Code Snippet
<ins-button label="TEXT" color="secondary" size="normal"> </ins-button> <ins-button label="NORMAL" solid color="secondary" size="normal"> </ins-button> <ins-button label="OUTLINED" color="secondary" outlined size="normal"> </ins-button>
Code Snippet
<ins-button label="TEXT" color="negative" size="normal"> </ins-button> <ins-button label="NORMAL" solid color="negative" size="normal"> </ins-button> <ins-button label="OUTLINED" color="negative" outlined size="normal"> </ins-button>
Code Snippet
<ins-button label="TEXT" color="warning" size="normal"> </ins-button> <ins-button label="NORMAL" solid color="warning" size="normal"> </ins-button> <ins-button label="OUTLINED" color="warning" outlined size="normal"> </ins-button>
Code Snippet
<ins-button label="TEXT" color="information-1" size="normal"></ins-button> <ins-button label="NORMAL" solid color="information-1" size="normal"></ins-button> <ins-button label="OUTLINED" color="information-1" outlined size="normal"></ins-button>
Code Snippet
<ins-button label="TEXT" color="information-2" size="normal"> </ins-button> <ins-button label="NORMAL" solid color="information-2" size="normal"> </ins-button> <ins-button label="OUTLINED" color="information-2" outlined size="normal"> </ins-button>
Code Snippet
<ins-button label="OUTLINED" color="blue" solid size="normal" loading> </ins-button>
Code Snippet
<ins-button label="OUTLINED" color="blue" solid size="small" loading> </ins-button>
Code Snippet
<ins-button label="OUTLINED" color="blue" solid size="large" loading> </ins-button>
Code Snippet
<ins-button id="submitButton" label="Loading button" color="blue" solid> </ins-button> <script> var submitButtonEl = document.getElementById('submitButton'); submitButtonEl.addEventListener('insClick', function(e){ submitButtonEl.loading = true; setTimeout(() => { submitButtonEl.loading = false; }, 2000); }); </script>
Code Snippet
<ins-button id="onClickInsButton" data="demo-data"> </ins-button> <script> const onClickInsButton = document.getElementById('onClickInsButton') onClickInsButton.addEventListener('insClick', event => { console.log(event.detail.label); console.log(event.detail.data); alert('Hello! I am an alert box!!'); }); </script>
Code Snippet
<ins-button id="onClickInsButtonOption" label="NORMAL" solid options="Option 2,Option 3"> </ins-button> <script> var button = document.getElementById('onClickInsButtonOption'); // Event handler to check button 'options' click button.addEventListener('insClickOption', function(event) { console.log(event.detail.label); alert(event.detail.option); }); // Event handler for 'main button' click button.addEventListener('insClick', function(event) { console.log(event.detail.label); alert('Main Button Label ' + event.detail.label); }); </script>
FIELD ATTRIBUTE | TYPE | DEFAULT | OPTIONS | DESCRIPTION |
---|---|---|---|---|
color | string | blue | blue / green / positive / warning | Defines color of button |
label | string | BUTTON | any | Defines label of button |
icon | string | "" | Insites Font Icons | Defines icon of button |
icon-right | string | "" | Insites Font Icons | Defines icon of button after the label |
size | string | normal | normal, small, large | Defines size of button |
data | string | "" | any | Defines data of button |
type | string | "" | any | Defines type of button |
options | string | "" | any value separated by comma | Defines dropdown options of button |
dropdown | boolean | false | true, false | Makes the whole button show options on click |
solid | boolean | false | true, false | Enables button to have solid display color |
disabled | boolean | false | true, false | Disables button |
cursor | string | "" | text, default | Defines appearance of cursor |
text-transform | string | "" | uppercase, lowercase, none | Defines appearance of label |
loading | boolean | false | true, false | Enables loading state of button |
EVENT | OBJECT | DESCRIPTION |
---|---|---|
insClick | label, data | Execute a script when button is clicked |
insClickOption | label | Execute a script when button option is clicked |
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.