1.0.5 • Published 7 years ago
awesome-vue-toast v1.0.5
awesome-vue-toast
:whale: awesome vue2 simple toast
- Can be singleton
- Programmable
Changed from AStaroverov/vue-toast
Example
Screenshot
Install
npm i -S awesome-vue-toast
Usage
import Toast from 'awesome-vue-toast'
...
Toast.showToast('Enjoy toast!')
Singleton
<body>
...
<script src="./awesome-vue-toast/build/js/toast.js"></script>
<script>
...
Toast.showToast('Enjoy toast!')
...
</script>
...
</body>
Option
Toast.addMessage({
text: 'This is success type',
type: 'success',
dismissAfter: 3 * 1000
})
option | type | default | other value |
---|---|---|---|
text | String | ||
type | String | info | success, warning, danger |
dismissAfter | Int | 5 * 1000 | milliseconds |
Development / build
npm run dev # development
npm run build # build
For customization props
props | default | other value | description |
---|---|---|---|
position | se | n, s, nw, ne, sw, se | north, south, north west, ... |