Class MessageVariant
Specifies the predefined appearance variants for the SfMessage component to control the visual presentation style.
Inheritance
Namespace: Syncfusion.Blazor.Notifications
Assembly: Syncfusion.Blazor.dll
Syntax
public sealed class MessageVariant : Enum
Remarks
The MessageVariant enumeration provides different styling options that work in conjunction with MessageSeverity to create various visual presentations. Each variant offers a distinct way to display the severity-based colors and styling.
Examples
Using different message variants with severity levels.
<SfMessage Severity="MessageSeverity.Success" Variant="MessageVariant.Filled" Content="Filled success message" />
<SfMessage Severity="MessageSeverity.Warning" Variant="MessageVariant.Outlined" Content="Outlined warning message" />
<SfMessage Severity="MessageSeverity.Info" Variant="MessageVariant.Text" Content="Text-only info message" />
Fields
Filled
The MessageSeverity is differentiated using text color and dark background colors.
Declaration
public const MessageVariant Filled
Field Value
Type |
---|
MessageVariant |
Remarks
This variant provides the most prominent styling with bold, saturated background colors and contrasting text, making it highly visible and attention-grabbing.
Outlined
The MessageSeverity is differentiated using text color and border styling without background color.
Declaration
public const MessageVariant Outlined
Field Value
Type |
---|
MessageVariant |
Remarks
This variant emphasizes the message through colored borders and text while maintaining a transparent background, providing clear visual separation without adding background weight.
Text
The MessageSeverity is differentiated using text color and light background colors.
Declaration
public const MessageVariant Text
Field Value
Type |
---|
MessageVariant |
Remarks
This variant provides subtle styling with severity-based text colors and light background colors, offering a gentle visual distinction without being overpowering.