Class MudIconButton
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
Represents a button consisting of an icon.
public class MudIconButton : MudBaseButton, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
- Inheritance
-
MudIconButton
- Implements
- Inherited Members
- Extension Methods
Remarks
Creates a button element,
or anchor if Href
is set.
You can directly add attributes like title
or aria-label
.
Constructors
MudIconButton()
public MudIconButton()
Properties
AsButton
protected bool AsButton { get; }
Property Value
ChildContent
The custom content within this button.
[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }
Property Value
Remarks
Defaults to null
. Only displays if Icon is not set.
Classname
protected string Classname { get; }
Property Value
Color
The color of the button.
[Parameter]
[Category("Appearance")]
public Color Color { get; set; }
Property Value
Remarks
Edge
The amount of negative margin applied.
[Parameter]
[Category("Appearance")]
public Edge Edge { get; set; }
Property Value
Remarks
Icon
The icon to display.
[Parameter]
[Category("Behavior")]
public string? Icon { get; set; }
Property Value
Remarks
Defaults to null
.
Size
The size of the button.
[Parameter]
[Category("Appearance")]
public Size Size { get; set; }
Property Value
Remarks
Defaults to Medium.
Variant
The display variation to use.
[Parameter]
[Category("Appearance")]
public Variant Variant { get; set; }
Property Value
Remarks
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder