Table of Contents

Class TwInputRoot

Namespace
TwBlazor.Components
Assembly
TwBlazor.dll

Used for all input components to wrap the input element and provide a consistent root element for styling and attributes.

public class TwInputRoot : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
Inheritance
TwInputRoot
Implements
Inherited Members

Constructors

TwInputRoot()

public TwInputRoot()

Properties

ChildContent

The input element is rendered as a child of this component, allowing it to apply consistent styling and attributes to the root element. The ChildContent parameter is used to render the input element within the TwInputRoot component.

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

Property Value

RenderFragment

RootAriaLabel

Optional ARIA label for the root element.

[Parameter]
public string? RootAriaLabel { get; set; }

Property Value

string

RootAriaLabelledBy

Optional ARIA labelledby attribute for the root element.

[Parameter]
public string? RootAriaLabelledBy { get; set; }

Property Value

string

RootAttributes

The additional attributes applied to the root element.

[Parameter]
public required Dictionary<string, object>? RootAttributes { get; set; }

Property Value

Dictionary<string, object>

RootClass

The classes applied to the root element.

[Parameter]
public required string? RootClass { get; set; }

Property Value

string

RootErrorId

The id applied to the rendered error message element. Must match the id the input component passes to its own aria-describedby for the association to work.

[Parameter]
public string? RootErrorId { get; set; }

Property Value

string

RootErrorMessage

Optional validation error message. When set, rendered below the input and given the id RootErrorId so the input's aria-describedby can reference it.

[Parameter]
public string? RootErrorMessage { get; set; }

Property Value

string

RootId

The id of the root element.

[Parameter]
public required string RootId { get; set; }

Property Value

string

RootRef

The reference to the root DOM element. Set internally via @ref on the rendered div. Consumers capture this by holding a @ref to the TwInputRoot component instance.

public ElementReference RootRef { get; }

Property Value

ElementReference

RootStyle

Optional inline style for the root element.

[Parameter]
public string? RootStyle { get; set; }

Property Value

string

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder