Table of Contents

Class TwBlazorTextInputComponentBase

Namespace
TwBlazor
Assembly
TwBlazor.dll

Base class for input components styled via InputVariant (Default, Outlined, Filled) - text-editable "textfield-shaped" controls (TwTextfield<T>, TwSelect<T>, TwColorPicker) and the popover pickers built on top of a textfield trigger (TwDatePicker, TwTimePicker, TwDateTimePicker).

public abstract class TwBlazorTextInputComponentBase : TwBlazorInputComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent, ITwInputComponent
Inheritance
TwBlazorTextInputComponentBase
Implements
Derived
Inherited Members

Remarks

Deliberately narrower than TwBlazorInputComponentBase: other inputs derived from that base (checkboxes, radio buttons, switches, sliders, progress bars, file upload) have no Default/Outlined/Filled textfield concept, and one of them (TwFileUpload) already exposes its own unrelated Variant (a ButtonVariant) - Blazor's parameter binding rejects two same-named parameters on one component even when one hides the other via new, so Variant can't live on the shared input base without colliding there.

Constructors

TwBlazorTextInputComponentBase()

protected TwBlazorTextInputComponentBase()

Properties

Dense

Gets or sets whether the input uses a more compact height and text size, useful when screen space is limited.

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

Property Value

bool

Remarks

The height and text size come from Size and DenseSize, shared by every single-line input so they all line up. Not applied to a multi-select (Multiple), whose height is driven by its selected chips.

Variant

Gets or sets the visual variant of the input control (Default, Outlined, Filled).

[Parameter]
public InputVariant? Variant { get; set; }

Property Value

InputVariant?

Remarks

If not set, uses the global default from DefaultInputVariant - see effectiveVariant.

effectiveVariant

Gets the effective input variant to use: Variant when explicitly set by the consumer, otherwise the global default configured via DefaultInputVariant.

protected InputVariant effectiveVariant { get; }

Property Value

InputVariant

inputSizeClasses

Gets the height and text size classes for a single-line input: DenseSize when Dense is set, otherwise Size.

protected string inputSizeClasses { get; }

Property Value

string