Table of Contents

Class MudFab

Namespace
MudBlazor
Assembly
MudBlazor.dll

Represents a floating action button.

public class MudFab : MudBaseButton, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
Inheritance
MudFab
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

MudFab()

public MudFab()

Properties

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. Theme colors are supported.

EndIcon

The icon shown after any text.

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

Property Value

string

Remarks

Defaults to null. Use the StartIcon property to show an icon before text.

IconColor

The color of any icons.

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

Property Value

Color

Remarks

Defaults to Inherit. Controls the color of StartIcon and EndIcon icons.

IconSize

The size of the icon.

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

Property Value

Size

Remarks

Defaults to Medium.

Label

The text displayed in the button.

[Parameter]
[Category("Behavior")]
public string? Label { 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 Large.

StartIcon

The icon shown before any text.

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

Property Value

string

Remarks

Defaults to null. Use the EndIcon property to show an icon after text.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

See Also