Interface ITwInputComponent
- Namespace
- TwBlazor.Abstraction
- Assembly
- TwBlazor.dll
public interface ITwInputComponent
Properties
Disabled
Gets or sets whether the input component is disabled.
bool Disabled { get; set; }
Property Value
Remarks
When true, the component is visually dimmed and cannot be interacted with.
ErrorMessage
Gets or sets the validation error message to display and associate with the input.
string ErrorMessage { get; set; }
Property Value
Remarks
Only rendered and referenced by aria-describedby when Invalid is true.
Invalid
Gets or sets whether the input component currently fails validation.
bool Invalid { get; set; }
Property Value
Remarks
When true (and ErrorMessage is set), the control is marked aria-invalid and programmatically associated with the rendered error text via aria-describedby, so assistive tech announces the error alongside the field instead of leaving it undiscoverable.
Label
Gets or sets the text label associated with the component.
string Label { get; set; }
Property Value
LabelAttributes
Gets or sets a collection of additional attributes to apply to the label element.
Dictionary<string, object> LabelAttributes { get; set; }
Property Value
Remarks
Use this property to add arbitrary HTML attributes to the rendered label, such as custom data attributes, CSS classes, or ARIA attributes. Existing attributes with the same name may be overwritten.
LabelClass
Gets or sets the classes for the label.
string LabelClass { get; set; }
Property Value
LabelClasses
Gets the CSS classes applied to the label element.
string LabelClasses { get; }
Property Value
Remarks
Combines the default label styling (block display, margin, font size, and weight) with any custom classes specified in LabelClass.
LabelId
Gets or sets the unique identifier for the associated label element.
string LabelId { get; set; }
Property Value
Remarks
Use this property to specify the ID of a label element that is associated with the component for accessibility purposes. Setting this value enables assistive technologies to correctly identify and describe the component.
ReadOnly
Gets or sets whether the input component is readonly.
bool ReadOnly { get; set; }
Property Value
Remarks
When true, the component cannot be edited by the user but will still display its current value.
RootAttributes
Gets or sets the additional attributed applied to the root element of the component.
Dictionary<string, object> RootAttributes { get; set; }
Property Value
RootClass
Gets or sets the CSS class name applied to the root element of the component.
string RootClass { get; set; }
Property Value
RootId
Gets or sets the unique identifier for the root element.
string RootId { get; set; }
Property Value
Methods
Close()
Closes the component's picker dialog. Override in picker components to handle close logic.
[JSInvokable("Close")]
Task Close()