Simple message service based on vuetify snackbar component.
npm install vuetify-message> Simple toast service based on vuetify snackbar component.
> Demo: https://aguegu.github.io/vuetify-message/
> Inspired by
- vuetify-toast
- vuetify-confirm
- element/message
``bash`
npm install --save vuetify-message
`js`
import VuetifyMessage from 'vuetify-message';
Vue.use(VuetifyMessage, [defaultOptions]);`
or`
Vue.use(VuetifyMessage, {
timeout: 1000,
property: '$message',
});
property: '$message' will create property with this name in Vue prototype
- this.$message.show([options])this.$message.success(text, [options])
- this.$message.info(text, [options])
- this.$message.warning(text, [options])
- this.$message.error(text, [options])
-
- text (String) The text to show in the snackbaricon
- (String) If you want to use an icon to the left in the snackbarcolor
- (String) Color of the snackbar, you can use any valid vuetify class. Default 'info'timeout
- (Number) Timeout in milliseconds, default: 3000x
- (String), as snackbar usage, left , right or '', default 'right'y
- (String), as snackbar usage, top, bottom or '', default 'top'mode
- (String), as snackbar usage, multi-line, vertical or '', default ''
Bundle the js of to the dist folder:
`bash``
npm run build