menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TextBoxModel - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TextBoxModel

    Interface for a class TextBox.

    Inheritance
    System.Object
    TextBoxModel
    Namespace: Syncfusion.Blazor.Inputs
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class TextBoxModel : Object

    Constructors

    TextBoxModel()

    Declaration
    public TextBoxModel()

    Properties

    Autocomplete

    Specifies whether the browser is allowed to automatically enter or select a value for the TextBox.

    By default, autocomplete is enabled for TextBox.

    Possible values are:

    • OnSpecifies that autocomplete is enabled
    • OffSpecifies that autocomplete is disabled.
    Declaration
    public AutoComplete Autocomplete { get; set; }
    Property Value
    Type
    AutoComplete

    CssClass

    Specifies the CSS class name that can be appended with the root element of the TextBox. One or more custom CSS classes can be added to a TextBox.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type
    System.String

    Enabled

    Specifies a boolean value that indicates whether the TextBox allows the user to interact with it.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type
    System.Boolean

    EnablePersistence

    Enable or disable the persisting TextBox state between page reloads. If enabled, the Value state will be persisted.

    Declaration
    public bool EnablePersistence { get; set; }
    Property Value
    Type
    System.Boolean

    EnableRtl

    Enable or disable rendering component in the right to left direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type
    System.Boolean

    FloatLabelType

    Specifies the floating label behavior of the TextBox that the placeholder text floats above the TextBox based on the following values.

    Possible values are:

    • NeverNever floats the label in the TextBox when the placeholder is available.
    • AlwaysThe floating label always floats above the TextBox.
    • AutoThe floating label floats above the TextBox after focusing it or when enters the value in it.
    Declaration
    public FloatLabelType FloatLabelType { get; set; }
    Property Value
    Type
    FloatLabelType

    HtmlAttributes

    You can add the additional html attributes such as styles, class, and more to the root element.

    If you configured both property and equivalent html attributes, then the component considers the property value.

    Declaration
    public Dictionary<string, object> HtmlAttributes { get; set; }
    Property Value
    Type
    System.Collections.Generic.Dictionary<System.String, System.Object>

    InputAttributes

    You can add the additional input attributes such as disabled, value, and more to the root element.

    If you configured both property and equivalent input attribute, then the component considers the property value.

    Declaration
    public Dictionary<string, object> InputAttributes { get; set; }
    Property Value
    Type
    System.Collections.Generic.Dictionary<System.String, System.Object>

    Multiline

    Specifies a boolean value that enables or disables the multiline on the TextBox.

    The TextBox changes from a single line to multiline when enabling this multiline mode.

    Declaration
    public bool Multiline { get; set; }
    Property Value
    Type
    System.Boolean

    Placeholder

    Specifies the text that is shown as a hint or placeholder until the user focuses or enter a value in TextBox. The property is depending on the FloatLabelType property.

    Declaration
    public string Placeholder { get; set; }
    Property Value
    Type
    System.String

    Readonly

    Specifies the boolean value whether the TextBox allows user to change the text.

    Declaration
    public bool Readonly { get; set; }
    Property Value
    Type
    System.Boolean

    ShowClearButton

    Specifies a boolean value that indicates whether the clear button is displayed in TextBox.

    Declaration
    public bool ShowClearButton { get; set; }
    Property Value
    Type
    System.Boolean

    TabIndex

    Specifies the tab order of the TextBox component.

    Declaration
    public int TabIndex { get; set; }
    Property Value
    Type
    System.Int32

    Type

    Specifies the behavior of the TextBox such as text, password, email, and more.

    Declaration
    public InputType Type { get; set; }
    Property Value
    Type
    InputType

    Value

    Sets the content of the TextBox.

    Declaration
    public string Value { get; set; }
    Property Value
    Type
    System.String

    Width

    Specifies the width of the TextBox component.

    Declaration
    public string Width { get; set; }
    Property Value
    Type
    System.String
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved