1.0.6 • Published 2 years ago

@aminoeditor/vue-notify v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Vue Notify

Minimalist global notifications for your Vue 3 application

Getting started

Install

npm i --save @aminoeditor/vue-notify

Setup

Install the plugin

// main.js
import { createApp } from 'vue'

import App from './App.vue'
import VueNotify from '@aminoeditor/vue-notify';

createApp(App)
.use(VueNotify)
.mount('#app')

Load the default styles

// App.vue
<style lang="scss">
@import "@aminoeditor/vue-notify";
</style>

Use Case

<template>
	<a @click.prevent="$notify('Hello World!')">Say Hello</a>
</template>

Configuration

Global Options
//main.js
createApp(App)
.use(VueNotify, {
   global: 'toast' // now you can call this.$toast('Hello World');
})
.mount('#app');
KeyData TypeDescriptionDefault
globalStringRename the global option keynotify
Notification Level Options
this.$notify('Hello World!', {
	displayMs: 5000 // how long before notification should disappear
});
KeyData TypeDescriptionDefault
displayMsNumberSet display time (in ms) for notification2500
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago