Class MudIcon
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
A picture displayed via an SVG path or font.
public class MudIcon : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
- Inheritance
-
MudIcon
- Implements
- Inherited Members
- Extension Methods
Remarks
You can use the Icons class and Icons Reference for SVG paths, or a Font Awesome CSS Class.
Constructors
MudIcon()
public MudIcon()
Properties
ChildContent
The content within this icon.
[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }
Property Value
Classname
protected string Classname { get; }
Property Value
Color
The color of this icon.
[Parameter]
[Category("Appearance")]
public Color Color { get; set; }
Property Value
Remarks
Disabled
Ignores any custom color.
[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }
Property Value
Remarks
Defaults to false
. When true
, a disabled color will be used instead of the Color.
Icon
The SVG path or Font Awesome font icon to display.
[Parameter]
[Category("Behavior")]
public string? Icon { get; set; }
Property Value
Remarks
You can use the Icons class and Icons Reference for SVG paths, or a Font Awesome CSS Class.
Size
The size of this icon.
[Parameter]
[Category("Appearance")]
public Size Size { get; set; }
Property Value
Remarks
Defaults to Medium.
Title
The text to display for the tooltip.
[Parameter]
[Category("Behavior")]
public string? Title { get; set; }
Property Value
Remarks
Defaults to null
. Sets the title
HTML attribute.
ViewBox
For SVG icons, the size of the SVG viewbox.
[Parameter]
[Category("Behavior")]
public string ViewBox { get; set; }
Property Value
Remarks
Defaults to "0 0 24 24"
. Applies when using the Icons class to set the icon.
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder