1.0.4 • Published 3 years ago

vue-notification-ui v1.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
3 years ago

Vue Notification UI

Alt

A simple notification ui with Vuejs

Installation

npm install vue-notification-ui --save

Usage

import Vue from 'vue'
import notification from 'vue-notification-ui'

Vue.use(notification, {
  position: 'notification-top-right', // top, bottom, left, right
  duration: 5000, // default
  left: 20, // default
  bottom: 20, // default
  top: 20, // default
  right: 40 // default
})


// call $notification api
this.$notification(
  'Good job!', 
  'You clicked the button!',
  'success', 
  async () => {
    console.log('Clicked notification')
  }, 
  'A minute ago'
)

Notification options

paramsdefaultdescription
titlestring: required: true
bodystring: required: true
iconstring: optional- absolute file image - success - info - warning - danger
callbackfunction: optional
timestring: optionalA minutes ago