The Nuxt Notify is a beautiful, responsive, customisable, accessible replacement for Javascript’s popup boxes. This plugin helps to turn standard Nuxt alerts into "growl" like notifications. Keep reading our Nuxt Notify examples and learn how to use this plugin.
Initialization
You can trigger notifications both from template and javascript via $notify or this.$notify method.
Example
Colors
Notification props
PROP NAME
TYPE
DEFAULT
DESCRIPTION
message
String
N/A
title
String
N/A
Notification title
icon
String
N/A
Notification icon
verticalAlign
String
top
Vertical alignment of notification (top/bottom)
horizontalAlign
String
right
Horizontal alignment of notification (left/center/right)
type
String
info
Notification type of notification (default/info/primary/danger/warning/success)
timeout
Number
5000
Notification timeout (closes after X milliseconds). Default is 5000 (5s)
timestamp
Date
Thu Apr 16 2020 14:51:53 GMT+0300 (Ora de vară a Europei de Est)
Notification timestamp (used internally to handle notification removal correctly)
component
Object / Function
N/A
Custom content component. Cane be a .vue component or render function
showClose
Boolean
true
Whether to show close button
closeOnClick
Boolean
true
Whether to close notification when clicking it’ body