A simple bootstrap styled Vue component for notifications

Notify

A simple bootstrap styled Vue component for notifications. Compatible with Vue 2.x

Requirements

Required packages:

  • vue 2+
  • velocity-animate 1.5+

Optional packages:

  • bootstrap (only used for styling)

Install

$ npm install vue2-notify --save

Then in your main.js:

import Notify from '../src/notify'

// Use Notify
Vue.use(Notify)

Usage

Inside your component:

this.$notify('A message that should be displayed', 'type')

or

Vue.$notify('A message that should be displayed', 'type')

You can override the itemClass, iconClass or visibility on a per usage basis:

this.$notify('A message that should be displayed', 'type', { itemClass: 'alert col-6 alert-info', iconClass: 'fa fa-lg fa-handshake-o', visibility: 10000 })

Type should be one of the types defined in the configuration of the component.

GitHub