Class MudBadge
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
Represents an overlay added to an icon or button to add information such as a number of new items.
public class MudBadge : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
- Inheritance
-
MudBadge
- Implements
- Inherited Members
- Extension Methods
Constructors
MudBadge()
public MudBadge()
Properties
BadgeAriaLabel
The aria-label for the badge.
[Parameter]
[Category("Behavior")]
public string? BadgeAriaLabel { get; set; }
Property Value
Remarks
Defaults to null.
BadgeClass
The CSS classes applied to the badge.
[Parameter]
[Category("Appearance")]
public string? BadgeClass { get; set; }
Property Value
Remarks
Defaults to null. You can use spaces to separate multiple classes.
BadgeClassname
protected string BadgeClassname { get; }
Property Value
Bordered
Displays a border around the badge.
[Parameter]
[Category("Appearance")]
public bool Bordered { get; set; }
Property Value
Remarks
Defaults to false.
ChildContent
The content within this badge.
[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }
Property Value
Classname
protected string Classname { get; }
Property Value
Color
The color of the badge.
[Parameter]
[Category("Appearance")]
public Color Color { get; set; }
Property Value
Remarks
Defaults to Default. Theme colors are supported.
Content
The string or int value to display inside the badge.
[Parameter]
[Category("Behavior")]
public object? Content { get; set; }
Property Value
Remarks
Supported types are string and int.
Dot
Displays a dot instead of any content.
[Parameter]
[Category("Behavior")]
public bool Dot { get; set; }
Property Value
Remarks
Defaults to false.
Elevation
The size of the drop shadow.
[Parameter]
[Category("Appearance")]
public int Elevation { get; set; }
Property Value
Remarks
Defaults to 0. A higher number creates a heavier drop shadow. Use a value of 0 for no shadow.
Icon
The icon to display in the badge.
[Parameter]
[Category("Behavior")]
public string? Icon { get; set; }
Property Value
Max
The maximum number allowed in the Content property.
[Parameter]
[Category("Behavior")]
public int Max { get; set; }
Property Value
Remarks
Defaults to 99.
OnClick
Occurs when the badge has been clicked.
[Parameter]
public EventCallback<MouseEventArgs> OnClick { get; set; }
Property Value
Origin
The location of the badge.
[Parameter]
[Category("Appearance")]
public Origin Origin { get; set; }
Property Value
Remarks
Defaults to TopRight.
Overlap
Displays ChildContent over the main badge content.
[Parameter]
[Category("Appearance")]
public bool Overlap { get; set; }
Property Value
Remarks
Defaults to false.
Visible
Displays this badge.
[Parameter]
[Category("Behavior")]
public bool Visible { get; set; }
Property Value
Remarks
Defaults to true.
WrapperClass
protected string WrapperClass { get; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builderRenderTreeBuilder
OnParametersSet()
protected override void OnParametersSet()