Table of Contents

Class MudInput<T>

Namespace
MudBlazor
Assembly
MudBlazor.dll
public class MudInput<T> : MudBaseInput<T>, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IFormComponent, IDisposable, IAsyncDisposable

Type Parameters

T
Inheritance
MudInput<T>
Implements
Derived
Inherited Members
Extension Methods

Constructors

MudInput()

public MudInput()

Properties

AdornmentClassname

protected string AdornmentClassname { get; }

Property Value

string

AutoGrow

If true the input element will grow automatically with the text.

[Parameter]
public bool AutoGrow { get; set; }

Property Value

bool

ChildContent

ChildContent of the MudInput will only be displayed if InputType.Hidden and if its not null.

[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

Classname

protected string Classname { get; }

Property Value

string

ClearButtonClassname

protected string ClearButtonClassname { get; }

Property Value

string

ClearIcon

Custom clear icon when Clearable is enabled.

[Parameter]
public string ClearIcon { get; set; }

Property Value

string

Clearable

Show clear button.

[Parameter]
public bool Clearable { get; set; }

Property Value

bool

ElementReference

public ElementReference ElementReference { get; }

Property Value

ElementReference

HideSpinButtons

Hides the spin buttons for MudNumericField<T>

[Parameter]
public bool HideSpinButtons { get; set; }

Property Value

bool

InputClassname

protected string InputClassname { get; }

Property Value

string

InputType

Type of the input element. It should be a valid HTML5 input type.

[Parameter]
public InputType InputType { get; set; }

Property Value

InputType

InputTypeString

protected string InputTypeString { get; }

Property Value

string

MaxLines

If AutoGrow is set to true, the input element will not grow bigger than MaxLines lines. If MaxLines is set to 0 or less, the property will be ignored.

[Parameter]
public int MaxLines { get; set; }

Property Value

int

NumericDownIcon

Custom numeric down icon.

[Parameter]
public string NumericDownIcon { get; set; }

Property Value

string

NumericUpIcon

Custom numeric up icon.

[Parameter]
public string NumericUpIcon { get; set; }

Property Value

string

OnClearButtonClick

Button click event for clear button. Called after text and value has been cleared.

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

Property Value

EventCallback<MouseEventArgs>

OnDecrement

Invokes the callback when the Down arrow button is clicked when the input is set to Number. Note: use the optimized control MudNumericField<T> if you need to deal with numbers.

[Parameter]
public EventCallback OnDecrement { get; set; }

Property Value

EventCallback

OnIncrement

Invokes the callback when the Up arrow button is clicked when the input is set to Number. Note: use the optimized control MudNumericField<T> if you need to deal with numbers.

[Parameter]
public EventCallback OnIncrement { get; set; }

Property Value

EventCallback

OnMouseWheel

Mouse wheel event for input.

[Parameter]
public EventCallback<WheelEventArgs> OnMouseWheel { get; set; }

Property Value

EventCallback<WheelEventArgs>

Methods

BlurAsync()

public override ValueTask BlurAsync()

Returns

ValueTask

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

ClearButtonClickHandlerAsync(MouseEventArgs)

protected virtual Task ClearButtonClickHandlerAsync(MouseEventArgs e)

Parameters

e MouseEventArgs

Returns

Task

DisposeAsync()

public ValueTask DisposeAsync()

Returns

ValueTask

FocusAsync()

public override ValueTask FocusAsync()

Returns

ValueTask

OnAfterRenderAsync(bool)

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Returns

Task

OnChange(ChangeEventArgs)

protected Task OnChange(ChangeEventArgs args)

Parameters

args ChangeEventArgs

Returns

Task

OnInput(ChangeEventArgs)

protected Task OnInput(ChangeEventArgs args)

Parameters

args ChangeEventArgs

Returns

Task

OnPaste(ClipboardEventArgs)

Paste hook for descendants.

protected virtual Task OnPaste(ClipboardEventArgs args)

Parameters

args ClipboardEventArgs

Returns

Task

SelectAsync()

public override ValueTask SelectAsync()

Returns

ValueTask

SelectRangeAsync(int, int)

public override ValueTask SelectRangeAsync(int pos1, int pos2)

Parameters

pos1 int
pos2 int

Returns

ValueTask

SetParametersAsync(ParameterView)

public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters ParameterView

Returns

Task

SetText(string)

Sets the input text from outside programmatically

public Task SetText(string text)

Parameters

text string

Returns

Task