Notification
Notification component of lightVue allow the user to show notifications on the page with any required content.
#Variants
You can use the various Variants of notification by passing a variation classes. LightVue comes with some stunning designs for notification.There are different types of notifications are present in lightVue you can go through this page for more info. LightVue Notification is Both compatible with Vue 3.x and Vue 2.x.You have to render the notification component in your root file (App.vue)
#Positions
You can change the positions of notification in the following way.
#Options
You can use the sticky and multiple if.do not pass any value in duration in order to make it sticky.
#Remove All
For removing all the notifications on the screen you can use the removeAllGroups() method.
#Setup
You can import a component and register it as a local and global vue component as follows:
// import the component
import LvNotification from 'lightvue/notification';
// Register the component locally
export default {
components: {
LvNotification
}
}
// Register the component globally (Vue 2.x)
Vue.component('LvNotification', LvNotification);
// Register the component globally (Vue 3.x)
const app = Vue.createApp({
// ...
});
app.component('LvNotification', LvNotification);
app.mount('#app')
#APIs
All of the props, events and slots of the component are mentioned below: