Deprecated: This component is deprecated and will not receive any updates. Please use kami-collection instead.
A simple flash component. DEMO
npm install --save kami-flash
Or grab from the dist folder :
<script src="KamiFlash.umd.js"></script>
<script src="../dist/KamiFlash.umd.js"></script>
<script>
window.onload = function(){
customElements.define('flash-exemple', KamiFlash);
}
</script>
Or:
// ES6 Modules or TypeScript
import KamiFlash from 'kami-flash'
// register the component with the name you want
window.customElements.define('kami-flash', KamiFlash);
Just add into your html the flash component like this. See the props section to customize your flash component.
<!-- Generate an error message with the text 'An error message !'-->
<flash-exemple
type="ERROR"
message="An error message !"
>
</flash-exemple>
name | type | description | required | default value |
---|---|---|---|---|
type | Type | The flash type | false | OK |
message | String | The flash message | false | 'Write your message flash here' |
position | Position | The flash position | false | BOTTOM |
stack | Boolean | Stack or not all flash | false | true |
time | Number | Time to wait before remove the flash | false | null |
progressbar | Boolean | Display a progress bar if time is set | false | false |
We would love you for the contribution to kami-flash
project, check the CONTRIBUTING
file for more info.