@dafcoe/vue-notification
Easy to use, customisable notification/toast library built using Vue3.
Installation
Install the package as a project dependency using yarn
or npm
:
$ yarn add @dafcoe/vue-notification
--- or ---
$ npm install --save @dafcoe/vue-notification
Usage
Import VueNotificationList
component, either globally (on your main.js / main.ts file) or locally (on your component):
Import default styles (optional - you can define your own styling):
Use it in the template as follows:
Options
Position
By default, the notification list is displayed on bottom right corner of the screen. You can customize this using "top-left", "top-right", "bottom-left" or "bottom-right" on position
prop:
Pushing Notifications
To push a notification, you have call setNotification
from vue-notification.store
, passing a notification object:
A notification object has the following properties: