Table of Contents

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

bool

ChildContent

The custom content within this button.

[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Remarks

Defaults to null. Only displays if Icon is not set.

Classname

protected string Classname { get; }

Property Value

string

Color

The color of the button.

[Parameter]
[Category("Appearance")]
public Color Color { get; set; }

Property Value

Color

Remarks

Defaults to Default in Color.

Edge

The amount of negative margin applied.

[Parameter]
[Category("Appearance")]
public Edge Edge { get; set; }

Property Value

Edge

Remarks

Defaults to False. Other values are Start and End

Icon

The icon to display.

[Parameter]
[Category("Behavior")]
public string? Icon { get; set; }

Property Value

string

Remarks

Defaults to null.

Size

The size of the button.

[Parameter]
[Category("Appearance")]
public Size Size { get; set; }

Property Value

Size

Remarks

Defaults to Medium.

Variant

The display variation to use.

[Parameter]
[Category("Appearance")]
public Variant Variant { get; set; }

Property Value

Variant

Remarks

Defaults to Text in Variant.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

See Also