Notification/Toast Library For Vue 3

Description:

Yet another notification& toast library for Vue 3.

Features:

  • Custom message.
  • Custom position.
  • 4 types: success, alert, warning, and info.
  • 3 themes: light, dark, glass.
  • Auto dismiss.

How to use it:

1. Import the vue-notification.

// Globally
import VueNotificationList from '@dafcoe/vue-notification'
import '@dafcoe/vue-notification/dist/vue-notification.css'
const app = createApp(App)
app.use(VueNotificationList).mount('#app')
// Or Locally
import { VueNotificationList } from '@dafcoe/vue-notification'
import '@dafcoe/vue-notification/dist/vue-notification.css'

2. Add the <vue-notification-list> component to the template and set the position:

  • top-left
  • top-right
  • bottom-left
  • bottom-right

<vue-notification-list position=”top-left”></vue-notification-list>

3. Push a notification.

import { useNotificationStore } from '@dafcoe/vue-notification'
const { setNotification } = useNotificationStore(OPTIONS)
setNotification(myNotification)

4. Available options.

{
  "message": "Notification Message",
  "type": "info"|"warning"|"alert"|"success",
  "showIcon": true,
  "dismiss": {
    "manually": false,
    "automatically": true
  },
  "duration": 5000,
  "showDurationProgress": true,
  "appearance": "light"|"dark"|"glass"
}

Preview:

notification-toast-library-for-vue-3

Download Details:

Author: dafcoe

Live Demo: https://dafcoe.github.io/vue-notification/

Download Link: https://github.com/dafcoe/vue-notification/archive/refs/heads/main.zip

Official Website: https://github.com/dafcoe/vue-notification

Install & Download:

# Yarn
$ yarn add @dafcoe/vue-notification

# NPM
$ npm i @dafcoe/vue-notification

You Might Be Interested In:

Tags:

Add Comment