To add a notification we have the global function $vs.notify
. The first parameter is a json
with all the necessary attributes, or if we only want the standard notification we can only add a string with the text of the notification
We can change the place where the notification appears with the property position. A practical example would be: position: 'top-right'. The supported values are
\n\nbottom-right
, it is not necessary to add the position property if it is the desired position\n Notifications can include icons to improve the user experience and to construct a more pleasant and intuitive notification. To make this, use the icon
property. A practical example would be: icon: 'chat'
Vuesax uses the Google Material Icons font library by default. For a list of all available icons, visit the official Material Icons page.
\nFontAwesome and other fonts library are supported. Simply use the icon-pack with fa or fas. You still need to include the Font Awesome icons in your project.
\nSometimes we need to execute a function when the user clicks on the notification. For this, pass a function to the click property. Example: click:()=>{ ... }
Nice, simple, and interactive notifications
\n\n