Implementing Syncfusion Blazor Notifications
A comprehensive skill for implementing Toast, Message, and Skeleton components from Syncfusion Blazor Notifications. These components provide essential user feedback mechanisms including temporary notifications, inline messages, and content loading states.
Component Overview
SfToast
Lightweight, non-blocking notification popups that appear temporarily to provide feedback. Supports positioning, animations, action buttons, and templates.
Key Features:
- Configurable positions (top-left, top-center, top-right, bottom-left, bottom-center, bottom-right)
- Show/hide animations with customizable timing
- Auto-dismiss with timeout and progress bar
- Action buttons for user interaction
- Template support for custom content
- Event callbacks (OnOpen, OnClose, OnClick)
- Multiple toast stacking (newest on top/bottom)
SfMessage
Inline alert component for displaying contextual feedback messages with different severity levels.
Key Features:
- Severity types (Normal, Info, Success, Warning, Error) with color-coded styling
- Variants (Text, Outlined, Filled) for different visual styles
- Built-in icons matching severity levels
- Optional close button for dismissible messages
- Content alignment (left, center, right)
- Visibility control and close event handling
- Custom CSS styling support
SfSkeleton
Loading placeholder component that displays animated shapes to indicate content is loading.
Key Features:
- Shapes (Circle, Square, Rectangle, Text) for different content types
- Shimmer effects (Pulse, Wave, Fade, None) for visual feedback
- Configurable dimensions (width, height)
- Accessibility labels for screen readers
- Visibility toggle for showing/hiding
- CSS customization for styling
Quick Start
Toast - Basic Example
@page "/toast-demo"
@using Syncfusion.Blazor.Notifications
@using Syncfusion.Blazor.Buttons
<SfButton @onclick="ShowToast">Show Toast</SfButton>
<SfToast @ref="ToastObj" Title="Notification" Content="Your changes have been saved successfully!" />
@code {
SfToast ToastObj;
private async Task ShowToast()
{
await ToastObj.ShowAsync();
}
}
Message - Basic Example
@page "/message-demo"
@using Syncfusion.Blazor.Notifications
<SfMessage Severity="MessageSeverity.Success" ShowIcon="true" ShowCloseIcon="true">
Your profile has been updated successfully!
</SfMessage>
<SfMessage Severity="MessageSeverity.Warning" ShowIcon="true">
Your session will expire in 5 minutes.
</SfMessage>
<SfMessage Severity="MessageSeverity.Error" ShowIcon="true" ShowCloseIcon="true">
Failed to save changes. Please try again.
</SfMessage>
Skeleton - Basic Example
@page "/skeleton-demo"
@using Syncfusion.Blazor.Notifications
<div class="skeleton-container">
<SfSkeleton Shape="SkeletonType.Circle" Width="60px" Height="60px" />
<div class="skeleton-text">
<SfSkeleton Shape="SkeletonType.Text" Width="80%" />
<SfSkeleton Shape="SkeletonType.Text" Width="60%" />
</div>
</div>
<style>
.skeleton-container {
display: flex;
gap: 16px;
padding: 16px;
}
.skeleton-text {
flex: 1;
display: flex;
flex-direction: column;
gap: 8px;
}
</style>
Documentation and Navigation Guide
Toast Component
Getting Started with Toast
📄 Read: references/toast-getting-started.md
- Installation and NuGet package setup
- Service registration in Program.cs
- Basic toast implementation
- Showing and hiding toasts programmatically
- Position configuration basics
- Simple success/error notifications
Advanced Toast Features
📄 Read: references/toast-features.md
- Position and alignment options (9 predefined positions)
- Animation settings (show/hide with effects and duration)
- Auto-dismiss with timeout and extended timeout
- Progress bar display and direction
- Action buttons with event handlers
- Title and content templates
- Multiple toast management and stacking order
- Event callbacks (OnOpen, OnClose, OnClick, BeforeOpen, BeforeClose)
- RTL (right-to-left) support
- Custom width, height, and CSS styling
- Target container specification
Message Component
Message Implementation
📄 Read: references/message-implementation.md
- Getting started with Message component
- Severity types (Normal, Info, Success, Warning, Error)
- Variant styles (Text, Outlined, Filled)
- Icon configuration (built-in and custom)
- Close icon and dismissal handling
- Content alignment options
- Visibility control and two-way binding
- Close event handling
- Custom content with ChildContent
- CSS class customization
- Accessibility features
- Integration with forms and validation
Skeleton Component
Skeleton Implementation
📄 Read: references/skeleton-implementation.md
- Getting started with Skeleton component
- Skeleton shapes (Circle, Square, Rectangle, Text)
- Shimmer effects (Pulse, Wave, Fade, None)
- Width and height configuration
- Visibility toggle for loading states
- Accessibility labels for screen readers
- Multiple skeleton layouts (lists, cards, tables)
- Common loading patterns (profile, article, grid)
- CSS customization and theming
- Performance considerations
Styling and Themes
Styling All Notification Components
📄 Read: references/styling-and-themes.md
- Theme integration (Bootstrap, Material, Fluent, Tailwind)
- Custom CSS classes for Toast
- Custom CSS classes for Message
- Custom CSS classes for Skeleton
- Dark mode support for all components
- Responsive design patterns
- Color customization
- Animation customization
- Component-specific styling techniques
Use Cases and Examples
Real-World Implementation Examples
📄 Read: references/use-cases-and-examples.md
- Form submission feedback (Toast + Message)
- E-commerce cart notifications
- Dashboard data updates
- File upload progress and feedback
- User authentication feedback
- Data loading with Skeleton placeholders
- Error handling and recovery
- Multi-step process feedback
- Notification center/history
- Combining all three components effectively
Common Patterns
Pattern 1: Success/Error Feedback with Toast
@code {
SfToast ToastObj;
private async Task SaveData()
{
try
{
await DataService.SaveAsync();
ToastObj.Title = "Success";
ToastObj.Content = "Data saved successfully!";
await ToastObj.ShowAsync();
}
catch (Exception ex)
{
ToastObj.Title = "Error";
ToastObj.Content = $"Failed to save: {ex.Message}";
await ToastObj.ShowAsync();
}
}
}
Pattern 2: Form Validation with Message
<EditForm Model="@model"
<DataAnnotationsValidator />
@if (!string.IsNullOrEmpty(errorMessage))
{
<SfMessage Severity="MessageSeverity.Error"
ShowIcon="true"
ShowCloseIcon="true"
Closed="@(() => errorMessage = null)">
@errorMessage
</SfMessage>
}
<!-- Form fields -->
</EditForm>
Pattern 3: Loading State with Skeleton
@if (isLoading)
{
<div class="product-card-skeleton">
<SfSkeleton Shape="SkeletonType.Rectangle" Width="100%" Height="200px" />
<SfSkeleton Shape="SkeletonType.Text" Width="80%" />
<SfSkeleton Shape="SkeletonType.Text" Width="60%" />
</div>
}
else
{
<div class="product-card">
<img src="@product.ImageUrl" alt="@product.Name" />
<h3>@product.Name</h3>
<p>@product.Description</p>
</div>
}
Pattern 4: Multiple Toast Types
<SfToast @ref="SuccessToast"
Title="Success"
Icon="e-success"
CssClass="e-toast-success"
<ToastPosition X="Right" Y="Top"></ToastPositio
<SfToast @ref="ErrorToast"
Title="Error"
Icon="e-error"
CssClass="e-toast-danger"
<ToastPosition X="Right" Y="Top"></ToastPosition>
<SfToast @ref="WarningToast"
Title="Warning"
Icon="e-warning"
CssClass="e-toast-warning"
<ToastPosition X="Right" Y="Top"></ToastPosition>
@code {
SfToast SuccessToast, ErrorToast, WarningToast;
private async Task ShowSuccess(string message)
{
SuccessToast.Content = message;
await SuccessToast.ShowAsync();
}
private async Task ShowError(string message)
{
ErrorToast.Content = message;
await ErrorToast.ShowAsync();
}
private async Task ShowWarning(string message)
{
WarningToast.Content = message;
await WarningToast.ShowAsync();
}
}
Installation
NuGet Package
dotnet add package Syncfusion.Blazor.Notifications
dotnet add package Syncfusion.Blazor.Themes
Service Registration
Program.cs:
using Syncfusion.Blazor;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddSyncfusionBlazor();
Namespace Import
_Imports.razor:
@using Syncfusion.Blazor.Notifications
Theme Reference
App.razor or layout file:
<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js"></script>
Key Properties Reference
Toast Properties
| Property |
Type |
Description |
| Content |
string |
Toast message content |
| Title |
string |
Toast title text |
| Icon |
string |
Icon CSS class |
| Position |
ToastPosition |
X and Y position (Top, Bottom, Left, Right, Center) |
| Timeout |
int |
Auto-hide duration in milliseconds (default: 5000) |
| ShowCloseButton |
bool |
Display close button (default: false) |
| ShowProgressBar |
bool |
Display progress bar (default: false) |
| NewestOnTop |
bool |
Stack newest toast on top (default: true) |
| CssClass |
string |
Custom CSS classes |
Message Properties
| Property |
Type |
Description |
| Severity |
MessageSeverity |
Normal, Info, Success, Warning, Error |
| Variant |
MessageVariant |
Text, Outlined, Filled |
| ShowIcon |
bool |
Display severity icon (default: true) |
| ShowCloseIcon |
bool |
Display close button (default: false) |
| Visible |
bool |
Control visibility |
| ContentAlignment |
HorizontalAlign |
Left, Center, Right alignment |
| CssClass |
string |
Custom CSS classes |
Skeleton Properties
| Property |
Type |
Description |
| Shape |
SkeletonType |
Circle, Square, Rectangle, Text |
| Effect |
ShimmerEffect |
Pulse, Wave, Fade, None |
| Width |
string |
Width in px, %, or other CSS units |
| Height |
string |
Height in px, %, or other CSS units |
| Visible |
bool |
Control visibility |
| Label |
string |
Accessibility label |
| CssClass |
string |
Custom CSS classes |
Common Use Cases
- Form Submission Feedback - Show success/error toast after form submission
- Validation Messages - Display inline messages for validation errors
- Loading States - Use skeleton during data fetching
- Cart Operations - Toast notifications for add/remove from cart
- File Upload - Progress feedback and completion notification
- API Errors - Display error messages with retry options
- Session Warnings - Show warning message before session expires
- Data Refresh - Skeleton placeholders during refresh operations
- Multi-Step Forms - Progress feedback at each step
- Real-time Updates - Toast notifications for live data changes
Troubleshooting
Toast Not Appearing
- Ensure
ShowAsync() is called to display the toast
- Verify toast component has content or template
- Check if toast timeout is too short
- Confirm ToastPosition is within viewport bounds
Message Not Visible
- Check
Visible property is set to true
- Verify message has content in ChildContent or Content property
- Ensure component is rendered in DOM (not hidden by parent)
- Check CSS z-index conflicts
Skeleton Not Animating
- Verify
Effect property is set (Pulse, Wave, or Fade)
- Check if shimmer effect CSS is loaded with theme
- Ensure skeleton has defined width and height
- Confirm
Visible is set to true
Theme Not Applied
- Verify theme CSS is referenced in App.razor or layout
- Check Syncfusion.Blazor.Themes package is installed
- Ensure CSS link is before component usage
- Try clearing browser cache
Service Not Registered
- Add
builder.Services.AddSyncfusionBlazor() in Program.cs
- Verify Syncfusion.Blazor.Core package is installed
- Ensure using statement is present
- Rebuild project after adding service
Best Practices
- Use appropriate notification type - Toast for temporary, Message for persistent
- Limit toast duration - 3-7 seconds for most messages, longer for errors
- Provide clear actions - Include retry/dismiss buttons where appropriate
- Skeleton resemblance - Make skeleton shapes match actual content structure
- Accessibility - Always provide labels for skeletons and icons
- Position consistency - Use same toast position throughout app
- Message severity - Use correct severity level for message context
- Avoid overuse - Don't overwhelm users with too many notifications
- Progressive enhancement - Use skeleton for perceived performance improvement
- Error handling - Always handle toast/message display errors gracefully
Next Steps
- Explore Toast Advanced Features for animations and templates
- Learn Message Implementation for form validation
- Review Skeleton Patterns for loading states
- Check Styling Guide for customization
- See Real-World Examples for complete scenarios
1---
2name: syncfusion-blazor-notifications
3description: Implement Syncfusion Blazor notification components (Toast, Message, Skeleton) for user feedback and loading states. ALWAYS use this when users need toast notifications, popup messages, alert boxes, success/error/warning/info messages, loading skeletons, shimmer effects, content placeholders, or any feedback UI. Trigger immediately when users mention notifications, toasts, alerts, messages, loading states, skeleton screens, shimmer loading, user feedback, status messages, SfToast, SfMessage, SfSkeleton, notification popups, or need to show temporary messages, form validation feedback, or loading placeholders.
4metadata:
5 author: "Syncfusion Inc"
6 version: "34.1.29"
7 category: "Blazor UI Components - Notifications"
8---
9
10# Implementing Syncfusion Blazor Notifications
11
12A comprehensive skill for implementing Toast, Message, and Skeleton components from Syncfusion Blazor Notifications. These components provide essential user feedback mechanisms including temporary notifications, inline messages, and content loading states.
13
14## Component Overview
15
16### SfToast
17Lightweight, non-blocking notification popups that appear temporarily to provide feedback. Supports positioning, animations, action buttons, and templates.
18
19**Key Features:**
20- Configurable positions (top-left, top-center, top-right, bottom-left, bottom-center, bottom-right)
21- Show/hide animations with customizable timing
22- Auto-dismiss with timeout and progress bar
23- Action buttons for user interaction
24- Template support for custom content
25- Event callbacks (OnOpen, OnClose, OnClick)
26- Multiple toast stacking (newest on top/bottom)
27
28### SfMessage
29Inline alert component for displaying contextual feedback messages with different severity levels.
30
31**Key Features:**
32- Severity types (Normal, Info, Success, Warning, Error) with color-coded styling
33- Variants (Text, Outlined, Filled) for different visual styles
34- Built-in icons matching severity levels
35- Optional close button for dismissible messages
36- Content alignment (left, center, right)
37- Visibility control and close event handling
38- Custom CSS styling support
39
40### SfSkeleton
41Loading placeholder component that displays animated shapes to indicate content is loading.
42
43**Key Features:**
44- Shapes (Circle, Square, Rectangle, Text) for different content types
45- Shimmer effects (Pulse, Wave, Fade, None) for visual feedback
46- Configurable dimensions (width, height)
47- Accessibility labels for screen readers
48- Visibility toggle for showing/hiding
49- CSS customization for styling
50
51## Quick Start
52
53### Toast - Basic Example
54
55```razor
56@page "/toast-demo"
57@using Syncfusion.Blazor.Notifications
58@using Syncfusion.Blazor.Buttons
59
60<SfButton @onclick="ShowToast">Show Toast</SfButton>
61
62<SfToast @ref="ToastObj" Title="Notification" Content="Your changes have been saved successfully!" />
63
64@code {
65 SfToast ToastObj;
66
67 private async Task ShowToast()
68 {
69 await ToastObj.ShowAsync();
70 }
71}
72```
73
74### Message - Basic Example
75
76```razor
77@page "/message-demo"
78@using Syncfusion.Blazor.Notifications
79
80<SfMessage Severity="MessageSeverity.Success" ShowIcon="true" ShowCloseIcon="true">
81 Your profile has been updated successfully!
82</SfMessage>
83
84<SfMessage Severity="MessageSeverity.Warning" ShowIcon="true">
85 Your session will expire in 5 minutes.
86</SfMessage>
87
88<SfMessage Severity="MessageSeverity.Error" ShowIcon="true" ShowCloseIcon="true">
89 Failed to save changes. Please try again.
90</SfMessage>
91```
92
93### Skeleton - Basic Example
94
95```razor
96@page "/skeleton-demo"
97@using Syncfusion.Blazor.Notifications
98
99<div class="skeleton-container">
100 <SfSkeleton Shape="SkeletonType.Circle" Width="60px" Height="60px" />
101 <div class="skeleton-text">
102 <SfSkeleton Shape="SkeletonType.Text" Width="80%" />
103 <SfSkeleton Shape="SkeletonType.Text" Width="60%" />
104 </div>
105</div>
106
107<style>
108 .skeleton-container {
109 display: flex;
110 gap: 16px;
111 padding: 16px;
112 }
113 .skeleton-text {
114 flex: 1;
115 display: flex;
116 flex-direction: column;
117 gap: 8px;
118 }
119</style>
120```
121
122## Documentation and Navigation Guide
123
124### Toast Component
125
126#### Getting Started with Toast
127📄 **Read:** [references/toast-getting-started.md](references/toast-getting-started.md)
128- Installation and NuGet package setup
129- Service registration in Program.cs
130- Basic toast implementation
131- Showing and hiding toasts programmatically
132- Position configuration basics
133- Simple success/error notifications
134
135#### Advanced Toast Features
136📄 **Read:** [references/toast-features.md](references/toast-features.md)
137- Position and alignment options (9 predefined positions)
138- Animation settings (show/hide with effects and duration)
139- Auto-dismiss with timeout and extended timeout
140- Progress bar display and direction
141- Action buttons with event handlers
142- Title and content templates
143- Multiple toast management and stacking order
144- Event callbacks (OnOpen, OnClose, OnClick, BeforeOpen, BeforeClose)
145- RTL (right-to-left) support
146- Custom width, height, and CSS styling
147- Target container specification
148
149### Message Component
150
151#### Message Implementation
152📄 **Read:** [references/message-implementation.md](references/message-implementation.md)
153- Getting started with Message component
154- Severity types (Normal, Info, Success, Warning, Error)
155- Variant styles (Text, Outlined, Filled)
156- Icon configuration (built-in and custom)
157- Close icon and dismissal handling
158- Content alignment options
159- Visibility control and two-way binding
160- Close event handling
161- Custom content with ChildContent
162- CSS class customization
163- Accessibility features
164- Integration with forms and validation
165
166### Skeleton Component
167
168#### Skeleton Implementation
169📄 **Read:** [references/skeleton-implementation.md](references/skeleton-implementation.md)
170- Getting started with Skeleton component
171- Skeleton shapes (Circle, Square, Rectangle, Text)
172- Shimmer effects (Pulse, Wave, Fade, None)
173- Width and height configuration
174- Visibility toggle for loading states
175- Accessibility labels for screen readers
176- Multiple skeleton layouts (lists, cards, tables)
177- Common loading patterns (profile, article, grid)
178- CSS customization and theming
179- Performance considerations
180
181### Styling and Themes
182
183#### Styling All Notification Components
184📄 **Read:** [references/styling-and-themes.md](references/styling-and-themes.md)
185- Theme integration (Bootstrap, Material, Fluent, Tailwind)
186- Custom CSS classes for Toast
187- Custom CSS classes for Message
188- Custom CSS classes for Skeleton
189- Dark mode support for all components
190- Responsive design patterns
191- Color customization
192- Animation customization
193- Component-specific styling techniques
194
195### Use Cases and Examples
196
197#### Real-World Implementation Examples
198📄 **Read:** [references/use-cases-and-examples.md](references/use-cases-and-examples.md)
199- Form submission feedback (Toast + Message)
200- E-commerce cart notifications
201- Dashboard data updates
202- File upload progress and feedback
203- User authentication feedback
204- Data loading with Skeleton placeholders
205- Error handling and recovery
206- Multi-step process feedback
207- Notification center/history
208- Combining all three components effectively
209
210## Common Patterns
211
212### Pattern 1: Success/Error Feedback with Toast
213
214```razor
215@code {
216 SfToast ToastObj;
217
218 private async Task SaveData()
219 {
220 try
221 {
222 await DataService.SaveAsync();
223 ToastObj.Title = "Success";
224 ToastObj.Content = "Data saved successfully!";
225 await ToastObj.ShowAsync();
226 }
227 catch (Exception ex)
228 {
229 ToastObj.Title = "Error";
230 ToastObj.Content = $"Failed to save: {ex.Message}";
231 await ToastObj.ShowAsync();
232 }
233 }
234}
235```
236
237### Pattern 2: Form Validation with Message
238
239```razor
240<EditForm Model="@model" OnValidSubmit="HandleValidSubmit">
241 <DataAnnotationsValidator />
242
243 @if (!string.IsNullOrEmpty(errorMessage))
244 {
245 <SfMessage Severity="MessageSeverity.Error"
246 ShowIcon="true"
247 ShowCloseIcon="true"
248 Closed="@(() => errorMessage = null)">
249 @errorMessage
250 </SfMessage>
251 }
252
253 <!-- Form fields -->
254</EditForm>
255```
256
257### Pattern 3: Loading State with Skeleton
258
259```razor
260@if (isLoading)
261{
262 <div class="product-card-skeleton">
263 <SfSkeleton Shape="SkeletonType.Rectangle" Width="100%" Height="200px" />
264 <SfSkeleton Shape="SkeletonType.Text" Width="80%" />
265 <SfSkeleton Shape="SkeletonType.Text" Width="60%" />
266 </div>
267}
268else
269{
270 <div class="product-card">
271 <img src="@product.ImageUrl" alt="@product.Name" />
272 <h3>@product.Name</h3>
273 <p>@product.Description</p>
274 </div>
275}
276```
277
278### Pattern 4: Multiple Toast Types
279
280```razor
281<SfToast @ref="SuccessToast"
282 Title="Success"
283 Icon="e-success"
284 CssClass="e-toast-success"
285 <ToastPosition X="Right" Y="Top"></ToastPositio
286
287<SfToast @ref="ErrorToast"
288 Title="Error"
289 Icon="e-error"
290 CssClass="e-toast-danger"
291 <ToastPosition X="Right" Y="Top"></ToastPosition>
292
293<SfToast @ref="WarningToast"
294 Title="Warning"
295 Icon="e-warning"
296 CssClass="e-toast-warning"
297 <ToastPosition X="Right" Y="Top"></ToastPosition>
298
299@code {
300 SfToast SuccessToast, ErrorToast, WarningToast;
301
302 private async Task ShowSuccess(string message)
303 {
304 SuccessToast.Content = message;
305 await SuccessToast.ShowAsync();
306 }
307
308 private async Task ShowError(string message)
309 {
310 ErrorToast.Content = message;
311 await ErrorToast.ShowAsync();
312 }
313
314 private async Task ShowWarning(string message)
315 {
316 WarningToast.Content = message;
317 await WarningToast.ShowAsync();
318 }
319}
320```
321
322## Installation
323
324### NuGet Package
325
326```bash
327dotnet add package Syncfusion.Blazor.Notifications
328dotnet add package Syncfusion.Blazor.Themes
329```
330
331### Service Registration
332
333**Program.cs:**
334```csharp
335using Syncfusion.Blazor;
336
337var builder = WebApplication.CreateBuilder(args);
338builder.Services.AddSyncfusionBlazor();
339```
340
341### Namespace Import
342
343**_Imports.razor:**
344```razor
345@using Syncfusion.Blazor.Notifications
346```
347
348### Theme Reference
349
350**App.razor or layout file:**
351```html
352<link href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" />
353<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js"></script>
354```
355
356## Key Properties Reference
357
358### Toast Properties
359
360| Property | Type | Description |
361|----------|------|-------------|
362| Content | string | Toast message content |
363| Title | string | Toast title text |
364| Icon | string | Icon CSS class |
365| Position | ToastPosition | X and Y position (Top, Bottom, Left, Right, Center) |
366| Timeout | int | Auto-hide duration in milliseconds (default: 5000) |
367| ShowCloseButton | bool | Display close button (default: false) |
368| ShowProgressBar | bool | Display progress bar (default: false) |
369| NewestOnTop | bool | Stack newest toast on top (default: true) |
370| CssClass | string | Custom CSS classes |
371
372### Message Properties
373
374| Property | Type | Description |
375|----------|------|-------------|
376| Severity | MessageSeverity | Normal, Info, Success, Warning, Error |
377| Variant | MessageVariant | Text, Outlined, Filled |
378| ShowIcon | bool | Display severity icon (default: true) |
379| ShowCloseIcon | bool | Display close button (default: false) |
380| Visible | bool | Control visibility |
381| ContentAlignment | HorizontalAlign | Left, Center, Right alignment |
382| CssClass | string | Custom CSS classes |
383
384### Skeleton Properties
385
386| Property | Type | Description |
387|----------|------|-------------|
388| Shape | SkeletonType | Circle, Square, Rectangle, Text |
389| Effect | ShimmerEffect | Pulse, Wave, Fade, None |
390| Width | string | Width in px, %, or other CSS units |
391| Height | string | Height in px, %, or other CSS units |
392| Visible | bool | Control visibility |
393| Label | string | Accessibility label |
394| CssClass | string | Custom CSS classes |
395
396## Common Use Cases
397
3981. **Form Submission Feedback** - Show success/error toast after form submission
3992. **Validation Messages** - Display inline messages for validation errors
4003. **Loading States** - Use skeleton during data fetching
4014. **Cart Operations** - Toast notifications for add/remove from cart
4025. **File Upload** - Progress feedback and completion notification
4036. **API Errors** - Display error messages with retry options
4047. **Session Warnings** - Show warning message before session expires
4058. **Data Refresh** - Skeleton placeholders during refresh operations
4069. **Multi-Step Forms** - Progress feedback at each step
40710. **Real-time Updates** - Toast notifications for live data changes
408
409## Troubleshooting
410
411### Toast Not Appearing
412- Ensure `ShowAsync()` is called to display the toast
413- Verify toast component has content or template
414- Check if toast timeout is too short
415- Confirm ToastPosition is within viewport bounds
416
417### Message Not Visible
418- Check `Visible` property is set to `true`
419- Verify message has content in ChildContent or Content property
420- Ensure component is rendered in DOM (not hidden by parent)
421- Check CSS z-index conflicts
422
423### Skeleton Not Animating
424- Verify `Effect` property is set (Pulse, Wave, or Fade)
425- Check if shimmer effect CSS is loaded with theme
426- Ensure skeleton has defined width and height
427- Confirm `Visible` is set to `true`
428
429### Theme Not Applied
430- Verify theme CSS is referenced in App.razor or layout
431- Check Syncfusion.Blazor.Themes package is installed
432- Ensure CSS link is before component usage
433- Try clearing browser cache
434
435### Service Not Registered
436- Add `builder.Services.AddSyncfusionBlazor()` in Program.cs
437- Verify Syncfusion.Blazor.Core package is installed
438- Ensure using statement is present
439- Rebuild project after adding service
440
441## Best Practices
442
4431. **Use appropriate notification type** - Toast for temporary, Message for persistent
4442. **Limit toast duration** - 3-7 seconds for most messages, longer for errors
4453. **Provide clear actions** - Include retry/dismiss buttons where appropriate
4464. **Skeleton resemblance** - Make skeleton shapes match actual content structure
4475. **Accessibility** - Always provide labels for skeletons and icons
4486. **Position consistency** - Use same toast position throughout app
4497. **Message severity** - Use correct severity level for message context
4508. **Avoid overuse** - Don't overwhelm users with too many notifications
4519. **Progressive enhancement** - Use skeleton for perceived performance improvement
45210. **Error handling** - Always handle toast/message display errors gracefully
453
454## Next Steps
455
456- Explore [Toast Advanced Features](references/toast-features.md) for animations and templates
457- Learn [Message Implementation](references/message-implementation.md) for form validation
458- Review [Skeleton Patterns](references/skeleton-implementation.md) for loading states
459- Check [Styling Guide](references/styling-and-themes.md) for customization
460- See [Real-World Examples](references/use-cases-and-examples.md) for complete scenarios