Notification Templates
The Notification allows you to customize its rendering by using Templates. This article explains the available layout templates for the component.
Template
The Template allows you to control the rendering of all Notifications which originate from the same reference. It provides a context - object of type NotificationModel (the model you pass to the Show() method). To apply different templates to different notifications you should provide different references too.
This section gives examples that show how to:
- Customize All Notifications From The Same Reference
- Use Different Templates
- Get a Click Event for Notification Body
Customize All Notifications From The Same Reference
Use Different Templates
When you are using different references in order to provide multiple templates the Notifications will not stack.
Get a Click Event for Notification Body
You can handle events in the template of the notification like with any other Blazor template. This lets you achieve interactivity in the templates. For example, you can know when the user clicks the notification text.