- bit BlazorUI

Message

A Message displays errors, warnings, or important information. For example, if a file failed to upload an error message should appear.

Usage

Basic
This is a Message. Visit our website.
Severity
Info (default).
Success.
Variant
Fill (default):
Info.
Success.


Outline:
Info.
Success.


Text:
Info.
Success.
Multiline
Multiline parameter makes the content to be rendered in multiple lines. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi luctus, purus a lobortis tristique, odio augue pharetra metus, ac placerat nunc mi nec dui. Vestibulum aliquam et nunc semper scelerisque. Curabitur vitae orci nec quam condimentum porttitor et sed lacus. Vivamus ac efficitur leo. Cras faucibus mauris libero, ac placerat erat euismod et. Donec pulvinar commodo odio sit amet faucibus. In hac habitasse platea dictumst. Duis eu ante commodo, condimentum nibh pellentesque, laoreet enim. Fusce massa lorem, ultrices eu mi a, fermentum suscipit magna. Integer porta purus pulvinar, hendrerit felis eget, condimentum mauris.
Truncate
Dismiss
Actions
Message with single line and action buttons.
 
HideIcon
HideIcon parameter removes the icon:
Info (default) Message.
Success Message.
Icons
Message with a custom icon.


Style & Class
Component's Style & Class:

Styled Message. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi luctus, purus a lobortis tristique, odio augue pharetra metus, ac placerat nunc mi nec dui. Vestibulum aliquam et nunc semper scelerisque. Curabitur vitae orci nec quam condimentum porttitor et sed lacus. Vivamus ac efficitur leo. Cras faucibus mauris libero, ac placerat erat euismod et. Donec pulvinar commodo odio sit amet faucibus. In hac habitasse platea dictumst. Duis eu ante commodo, condimentum nibh pellentesque, laoreet enim. Fusce massa lorem, ultrices eu mi a, fermentum suscipit magna. Integer porta purus pulvinar, hendrerit felis eget, condimentum mauris.

Classed Message. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi luctus, purus a lobortis tristique, odio augue pharetra metus, ac placerat nunc mi nec dui. Vestibulum aliquam et nunc semper scelerisque. Curabitur vitae orci nec quam condimentum porttitor et sed lacus. Vivamus ac efficitur leo. Cras faucibus mauris libero, ac placerat erat euismod et. Donec pulvinar commodo odio sit amet faucibus. In hac habitasse platea dictumst. Duis eu ante commodo, condimentum nibh pellentesque, laoreet enim. Fusce massa lorem, ultrices eu mi a, fermentum suscipit magna. Integer porta purus pulvinar, hendrerit felis eget, condimentum mauris.



Styles & Classes:


Advanced

 
RTL
پیام خبری (پیش فرض). به وبسایت ما سر بزنید.
پیام موفق. به وبسایت ما سر بزنید. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi luctus, purus a lobortis tristique, odio augue pharetra metus, ac placerat nunc mi nec dui. Vestibulum aliquam et nunc semper scelerisque. Curabitur vitae orci nec quam condimentum porttitor et sed lacus. Vivamus ac efficitur leo. Cras faucibus mauris libero, ac placerat erat euismod et. Donec pulvinar commodo odio sit amet faucibus. In hac habitasse platea dictumst. Duis eu ante commodo, condimentum nibh pellentesque, laoreet enim. Fusce massa lorem, ultrices eu mi a, fermentum suscipit magna. Integer porta purus pulvinar, hendrerit felis eget, condimentum mauris.

Implementation

BitMessage parameters
Name
Type
Default value
Description
Actions RenderFragment? null The content of the action to show on the message.
ChildContent RenderFragment? null The content of message.
Classes BitMessageClassStyles? null Custom CSS classes for different parts of the BitMessage.
CollapseIconName string DoubleChevronUp Custom Fabric icon name for the collapse icon in Truncate mode. If unset, default will be the Fabric DoubleChevronUp icon.
Content RenderFragment? null The alias for ChildContent.
DismissIconName string Cancel Custom Fabric icon name to replace the dismiss icon. If unset, default will be the Fabric Cancel icon.
ExpandIconName string DoubleChevronDown Custom Fabric icon name for the expand icon in Truncate mode. If unset, default will be the Fabric DoubleChevronDown icon.
HideIcon bool false Prevents rendering the icon of the message.
IconName string? null Custom icon to replace the message icon. If unset, default will be the icon set by Type.
Multiline bool false Determines if the message is multi-lined. If false, and the text overflows over buttons or to another line, it is clipped.
OnDismiss EventCallback Whether the message has a dismiss button and its callback. If null, dismiss button won't show.
Role string? null Custom role to apply to the message text.
Severity BitSeverity BitSeverity.Info The severity of the message. defaults to Info.
Styles BitMessageClassStyles? null Custom CSS styles for different parts of the BitMessage.
Truncate bool false Determines if the message text is truncated. If true, a button will render to toggle between a single line view and multiline view. This parameter is for single line messages with no buttons only in a limited space scenario.
Variant BitVariant BitVariant.Fill The variant of the message. defaults to Fill.
BitComponentBase parameters
Name
Type
Default value
Description
AriaLabel string? null The aria-label of the control for the benefit of screen readers.
Class string? null Custom CSS class for the root element of the component.
Dir BitDir? null Determines the component direction.
HtmlAttributes Dictionary<string, object> new Dictionary<string, object>() Capture and render additional attributes in addition to the component's parameters.
Id string? null Custom id attribute for the root element. if null the UniqueId will be used instead.
IsEnabled bool true Whether or not the component is enabled.
Style string? null Custom CSS style for the root element of the component.
Visibility BitVisibility BitVisibility.Visible Whether the component is visible, hidden or collapsed.
BitComponentBase public members
Name
Type
Default value
Description
UniqueId Guid Guid.NewGuid() The readonly unique id of the root element. it will be assigned to a new Guid at component instance construction.
RootElement ElementReference The ElementReference of the root element.
BitMessageClassStyles properties
Name
Type
Default value
Description
Root string? null Custom CSS classes/styles for the root element of the BitMessage.
Container string? null Custom CSS classes/styles for the main container of the BitMessage.
IconContainer string? null Custom CSS classes/styles for the icon container of the BitMessage.
Icon string? null Custom CSS classes/styles for the icon element of the BitMessage.
ContentContainer string? null Custom CSS classes/styles for the content container of the BitMessage.
ContentWrapper string? null Custom CSS classes/styles for the content wrapper element of the BitMessage.
Content string? null Custom CSS classes/styles for the content element of the BitMessage.
Actions string? null Custom CSS classes/styles for the actions element of the BitMessage.
ExpanderButton string? null Custom CSS classes/styles for the truncate expander button of the BitMessage.
ExpanderIcon string? null Custom CSS classes/styles for the truncate expander icon of the BitMessage.
DismissButton string? null Custom CSS classes/styles for the truncate dismiss button of the BitMessage.
DismissIcon string? null Custom CSS classes/styles for the truncate dismiss icon of the BitMessage.
BitSeverity enum
Name
Value
Description
Info 0 Info styled severity.
Success 1 Success styled severity.
Warning 2 Warning styled severity.
SevereWarning 3 SevereWarning styled severity.
Error 4 Error styled severity.
BitVariant enum
Name
Value
Description
Fill 0 Fill styled variant.
Outline 1 Outline styled variant.
Text 2 Text styled variant.
BitVisibility enum
Name
Value
Description
Visible 0 The content of the component is visible.
Hidden 1 The content of the component is hidden, but the space it takes on the page remains (visibility:hidden).
Collapsed 2 The component is hidden (display:none).
BitDir enum
Name
Value
Description
Ltr 0 Ltr (left to right) is to be used for languages that are written from the left to the right (like English).
Rtl 1 Rtl (right to left) is to be used for languages that are written from the right to the left (like Arabic).
Auto 2 Auto lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then applies that directionality to the whole element.