Package Exports
- @mathieustan/vue-notification
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mathieustan/vue-notification) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
vue-notification
A Notification (snackbar) Vue component. Compatible with Vue 2.x
Demo
To view a demo online: https://vue-notification.netlify.com/
Install
npm install @mathieustan/vue-notification --saveor
yarn add @mathieustan/vue-notificationimport VueNotification from '@mathieustan/vue-notification';
Vue.use(VueNotification);Usage
<script>
export default {
// ...
methods: {
showNotification () {
this.$notify('Hello, I am a notification');
},
},
//...
};Available props
| Prop | Type | Default | Description |
|---|---|---|---|
| message | String | '' | Message to show on notification |
| type | String | Show notification with specific type (info, success, warning, error) | |
| top | Boolean | false | Allow to position notification 'top' |
| bottom | Boolean | true | Allow to position notification 'bottom' |
| left | Boolean | false | Allow to position notification 'left' |
| right | Boolean | false | Allow to position notification 'right' |
| offset | Number | 0 | Add extra offset to notification (from top) |
| closeDelay | Number | 4500 | Delay before closing notification (in ms) |
| multiLine | Boolean | false | Makes the notification higher (mobile) (extra padding) |
| actionText | String | '' | Will add a button with this text after message |
| onActionClick | Function | Action when button will be clicked | |
| showClose | Boolean | false | Will add a close button |
| hideIcon | Boolean | false | Allow to hide icon for types (success,info,...) |