Skip to content
This repository was archived by the owner on Mar 31, 2022. It is now read-only.

Kamiapp-fr/kami-flash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

39 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Deprecated: This component is deprecated and will not receive any updates. Please use kami-collection instead.

<kami-flash>

A simple flash component. DEMO

Installation

npm install --save kami-flash

Or grab from the dist folder :

<script src="KamiFlash.umd.js"></script>

Usage

<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);

Examples

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>

Props

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

Contribute

We would love you for the contribution to kami-flash project, check the CONTRIBUTING file for more info.

About

๐Ÿ”” Simple flash web component.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published