It generates a notification with the Sax Design function (SNotification), to use the instance of the notification it is necessary to save it in a variable, for example if you need to close the notification manually or do other functionalities with the instance
The necessary properties are the title and the content
Code copied
<template><divclass="center"><s-button@click="openNotification"> Open Notification </s-button></div></template>
<scriptlang="ts"setup>import{ SNotification }from'sax-design-vue'constopenNotification=()=>{SNotification({title:'Sax Design Vue',content:'Sax Design Vue notification example with configurable content, color, and position.',})}</script>
Use the color property to change the base color of the component and some of the child components, to better understand the handling of colors and themes you can see it here
Add a progress bar to the notification, if the value of the progress property is auto be determined by the duration property to reach 100%, if you want the value to be manual you can add a number of the (0 - 100) being 100 100% and use the function in the changeProgress instance and change the value to the one provided as the first parameter
Change the duration of the notification with the duration property, the value is numerical and determine the seconds before the bone component is hidden that 10s equals 10000 as the value
if you need the notification to never be hidden, the duration value would be 0
Change the style of the notification with the flat property, having this property changes to lighter colors and the text of the color property, this property is a boolean so you can only use the value true
You can add a style to the paste component to the nearest corner with the sticky property, this property is a boolean po which can only have the value true
You can do great things with this component and some others from Sax Design, to add any element within the notification we have the property content this property can only receive an imported component and that is what it will generate within the notification
Code copied
<template><divclass="center"><s-buttontype="border"icon@click="openNotificationUser">
Example User
</s-button><s-buttontype="border"icon@click="openNotificationCookie">
Example Cookie
</s-button><s-buttontype="border"icon@click="openNotificationCall">
Example Call
</s-button></div></template>