All Components

Notification Overview

The Notification enables you to initialize it from any element because it does not manipulate the content of the element.

If the Notification is used with popup notifications or if static Notifications are not appended to the Notification element, the element is hidden. The reason for this behavior is the assumption that the element is not needed. However, if the Notification element is meant to contain static (not popping up) notifications, then set its tag in such a way so as to allow the nesting of the elements inside the template of the notifications. For example, inline elements (such as <span>, <a>, or <em>), cannot contain block elements (such as <div>, <p>, <ul>, <li>, or headings).

The Notification wrapper for Vue is a client-side wrapper for the Kendo UI Notification widget.

Basic Usage

The following example demonstrates the Notification in action.

<div id="vueapp" class="vue-app">
    <kendo-notification ref="popupNotification"></kendo-notification>
    <button id="showPopupNotification" class="k-button" @click="showPopupNotification">As a popup at bottom-right</button>
</div>
Vue.use(PopupsInstaller);
new Vue({
    el: '#vueapp',
    methods: {
        showPopupNotification: function (e) {
            this.popupNotificationWidget.show('myMessage');
        }
    },
    mounted: function () {
        this.popupNotificationWidget = this.$refs.popupNotification.kendoWidget();
    }
})

Functionality and Features

Event Handling

The following example demonstrates basic Notification events. You can subscribe to all Notification events by the handler name.

<div id="vueapp" class="vue-app">
    <kendo-notification ref="popupNotification"
                        @show="onShow"
                        @hide="onHide">
    </kendo-notification>

    <button id="showPopupNotification" class="k-button" @click="showPopupNotification">As a popup at bottom-right</button>
</div>
Vue.use(PopupsInstaller);

new Vue({
        el: '#vueapp',
        methods: {
            onShow: function (e) {
                console.log("Show")
            },
            onHide: function (e) {
                console.log("Hide")
            },
            showPopupNotification: function (e) {
                this.popupNotificationWidget.show('myMessage');
            }
        },
        mounted: function () {
            this.popupNotificationWidget = this.$refs.popupNotification.kendoWidget();
        }
    })
In this article