Include the notification component anywhere on your page. This component does not allow for much dynamic customization.
<script> showNotification(title, message, type, dismiss_in); </script>
|title||optional||Title of the notification. This should usually be very brief|
|message||required||Meesage to display to the user in the body of the notification. This can either be brief or descriptive.|
|type||optional||Type of notification to be displayed. Default is success. Available values are
|dismiss_in||optional||Numeric. In how many seconds should the notification be dismissed if the user does not explicitly click on the close button. Default is 10 seconds. Note the value is in seconds and not milliseconds. So 20 will mean 20 seconds.|
<script> showNotification('Delete Successful', 'Your downloaded file was deleted successfully'); </script>
<x-bladewind.button onclick="showNotification( 'Download Successful', 'Your download completed successfully')"> success </x-bladewind.button> <x-bladewind.button onclick="showNotification( 'Delete Failed', 'Your message could not be deleted. Try again', 'error')"> error </x-bladewind.button> <x-bladewind.button onclick="showNotification( 'Low Disk Space', `You have used 20gb of your 25gb storage space. <a href='#'>Upgrade soon</a>`, 'warning')"> warning </x-bladewind.button> <x-bladewind.button onclick="showNotification( 'Invitation Accepted', `Samuel just accepted your invitation to join BladewindUI Inc. <a href='#'>Say Hello</a>`, 'info')"> info </x-bladewind.button>
The table below shows a comprehensive list of all the attributes available for the Notification component.
Defines where the notification should be displayed. Available values are
<x-bladewind.notification position="top right" />
resources > views > components > bladewind > notification.blade.php