Table of Contents

Class MudLink

Namespace
MudBlazor
Assembly
MudBlazor.dll

A clickable link which can navigate to a URL.

public class MudLink : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
Inheritance
MudLink
Implements
Inherited Members
Extension Methods

Constructors

public MudLink()

Properties

The content within this component.

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

Property Value

RenderFragment
protected string Classname { get; }

Property Value

string

The color of the link.

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

Property Value

Color

Defaults to Primary in Color.

Prevents user interaction with this link.

[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }

Property Value

bool

Defaults to false.

The URL to navigate to upon click.

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

Property Value

string

Defaults to null.

Occurs when this link has been clicked.

[Parameter]
public EventCallback<MouseEventArgs> OnClick { get; set; }

Property Value

EventCallback<MouseEventArgs>

The browser frame to open this link when Href is specified.

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

Property Value

string

Possible values include _blank, _self, _parent, _top, or a frame name.
Defaults to null.

The typography variant to use.

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

Property Value

Typo

Defaults to body1 in Typo.

Applies an underline to the link.

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

Property Value

Underline

Defaults to Hover in Underline.

Methods

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder
protected Task OnClickHandler(MouseEventArgs ev)

Parameters

ev MouseEventArgs

Returns

Task