Value | string? | null | The text. Bind with @bind-Value. |
ValueExpression | Expression<Func<string?>>? | null | Set by @bind-Value. Server-backed edits then notify a surrounding EditForm's EditContext. In the plain case (no UpdateOnInput, OnKeyDown, InputValueChanged, focus or selection options, classic menu, clear button or ClientBuffered) the control renders Blazor's own InputText, or InputTextArea when multi-line. |
Placeholder | string? | null | Hint shown while the box is empty. An explicit placeholder attribute wins. |
CssClass | string? | null | Class on the input, merged with any class attribute. Without one the input has no styling of its own; this page adds text-field. |
Width | string? | null | CSS width written as an inline style, such as 250px or 100%. On a password box it sizes the wrapper and the input fills it. |
ShowClearButton | bool | false | Adds a × button inside a single-line box whose type is text. It shows while the box has focus and holds text; clicking it empties the box and raises ValueChanged with the empty text. |
Enabled | bool | true | False renders disabled. There is no ReadOnly parameter; a readonly attribute passes through to the input. |
MaxLength | int? | null | Writes maxlength. A client-buffered commit is also cut to this length. |
InputType | string | "text" | The input's type: email, tel, password and so on. Ignored when Multiline; an explicit type attribute wins except for a password box. |
Multiline | bool | false | Renders a <textarea> instead of an input. |
Rows | int? | null | Writes the rows attribute: the visible lines of a multi-line box. |
UpdateOnInput | bool | false | Raise ValueChanged on every keystroke instead of when the field changes. |
TypingBehavior | TextBoxTypingBehavior | TextBoxTypingBehavior.ServerBacked | ClientBuffered keeps keystrokes in the browser and sends the whole value when the box loses focus; see the values table. |
Uncontrolled | bool | true | The browser owns the text, so a parent re-render never writes older text back over what is being typed. False gives the controlled input whose value follows Value on every render. |
ReseedOnOutsideChange | bool | true | When the parent sets a different Value from code, a browser-owned box shows it. Grid editors that push values through their own channel set this false. |
AutoFocus | bool | false | Focuses the box after the first render and writes autofocus. |
SelectOnFocus | bool | false | With AutoFocus, that first focus selects the text. On a later focus the control asks its script to select, and the script skips this whenever the text differs from the element's value attribute, which Blazor does not write, so a box holding text is not selected. |
ReplaceOnFirstInput | bool | false | After the box gains focus, the first character typed replaces the whole text and the first Backspace or Delete clears it. A click inside the focused box cancels this. |
SelectAllOnDoubleClick | bool | false | Double-click asks the script to select the whole text; the same value-attribute check as SelectOnFocus skips it for a box holding text. |
UseClassicContextMenu | bool | false | Replaces the browser's right-click menu with the control's own Windows-style menu. |
ContextMenuItems | TextContextMenuItems | TextContextMenuItems.Legacy | The items the classic menu shows; see the values table. |
KeepNativeTab | bool | false | For ClientBuffered with an OnKeyDown handler: Tab commits and is reported once, but the browser still moves focus. Grid cell editors leave it false. |
TypingKeysStayLocal | bool | false | Keydown events for printable keys, Backspace and Delete are not sent to the server; the text itself still is. Not used with ClientBuffered. For browser-owned editors whose host ignores typing keys, such as the grid's cell editor. |
HtmlAttributes | Dictionary<string, object>? | null | More attributes for the input, merged after the unmatched ones. |
ElementReferenceCaptured | Action<ElementReference>? | null | Called after each render with the input's ElementReference. |
AdditionalAttributes | IDictionary<string, object>? | null | Captures unmatched attributes (id, aria-label, readonly…) and writes them on the input. |