Message
Description
A component to display a message
The Message component is used to display static messages, alerts, or empty states. It supports an icon, title, text body, and an optional note area.
It comes with variants for standard, success, warning, and error states.
Samples
Standard Message (with Note)
Error Message
No Results
API reference
public class Message : ComponentBase<Message, HTMLDivElement>An inline informational message strip with predefined tones (info, success, warning, error) and an optional dismiss button.
- Namespace
- Tesserae
- Inheritance
- ComponentBase<Message, HTMLDivElement> → Message
Constructors
| Name | Description |
|---|---|
| Message | Initializes a new instance of this class. |
Methods
| Name | Description |
|---|---|
| Icon | Configures the component to icon. |
| Title | Gets or sets the title of the component. |
| Text | Gets or sets the text shown in the component. |
| Note | Configures the component to note. |
| Illustration | Adds an illustration below the message content, for empty states that want a picture (a drawing, a mascot, an animation) instead of - or on top of - the leading icon. |
| Variant | Configures the component to variant. |
| Horizontal | Lays the message out horizontally, with the icon beside the text instead of stacked above it. |
| Action | Adds an action component to the message. On the default (vertical) layout it is rendered below the message content; on a horizontal message it is rendered on the right side, beside the content. |
| Render | Renders the component's root HTML element. |
| Overload | |
|---|---|
| Icon(UIcons, string, TextSize) | Configures the component to icon. |
| Icon(Image) | Configures the component to icon. |
| Overload | |
|---|---|
| Title(string) | Gets or sets the title of the component. |
| Title(IComponent) | Gets or sets the title of the component. |
| Overload | |
|---|---|
| Text(string) | Gets or sets the text shown in the component. |
| Text(IComponent) | Gets or sets the text shown in the component. |
| Overload | |
|---|---|
| Note(string) | Configures the component to note. |
| Note(IComponent) | Configures the component to note. |
public Message Illustration(IComponent illustration)Adds an illustration below the message content, for empty states that want a picture (a drawing, a mascot, an animation) instead of - or on top of - the leading icon.
public Message Variant(MessageVariant variant)Configures the component to variant.
public Message Horizontal(bool horizontal = true)Lays the message out horizontally, with the icon beside the text instead of stacked above it.
public Message Action(IComponent action)Adds an action component to the message. On the default (vertical) layout it is rendered below the message content; on a horizontal message it is rendered on the right side, beside the content.
public enum MessageVariant- Namespace
- Tesserae