JSPM

@mathieustan/vue-notification

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 322
  • Score
    100M100P100Q88743F
  • License MIT

Clean Notifications made with VueJs

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 --save

or

yarn add @mathieustan/vue-notification
import 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,...)