menu

Blazor

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

    Show / Hide Table of Contents

    Class IInput

    Defines the default required properties and configuration options for input components.

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

    This class serves as a base interface for input component configuration, providing common properties such as CSS classes, localization settings, floating label behavior, and interaction states that are shared across various input components in the Syncfusion Blazor suite.

    Constructors

    IInput()

    Declaration
    public IInput()

    Properties

    Change

    Gets or sets the change event mapping function for the input component.

    Declaration
    public object Change { get; set; }
    Property Value
    Type Description
    System.Object

    An object representing the change event handler, or null if no change handler is specified.

    Remarks

    This property allows mapping custom change event handlers to input components. The change event is typically triggered when the input value is modified and the input loses focus or when the user explicitly commits the change.

    CssClass

    Gets or sets the CSS class names to be applied to the input component.

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

    A string containing one or more CSS class names separated by spaces, or null if no custom classes are applied.

    Remarks

    This property allows custom styling of input components by applying CSS classes. Multiple classes can be specified by separating them with spaces. These classes will be added to the input element's class attribute.

    Enabled

    Gets or sets a value indicating whether the input component is enabled for user interaction.

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

    true if the input component is enabled; otherwise, false.

    Remarks

    When set to false, the input component becomes disabled and users cannot interact with it. Disabled input components typically appear grayed out and do not respond to user input or focus events.

    EnableRtl

    Gets or sets a value indicating whether right-to-left (RTL) text direction is enabled for the input component.

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

    true if RTL text direction is enabled; otherwise, false.

    Remarks

    When enabled, this property renders the input component with right-to-left text direction support, which is essential for languages such as Arabic, Hebrew, and other RTL languages. This affects both text alignment and component layout direction.

    FloatLabelType

    Gets or sets the floating label behavior for the input component.

    Declaration
    public object FloatLabelType { get; set; }
    Property Value
    Type Description
    System.Object

    An object specifying the floating label type, or null to use the default behavior.

    Remarks

    This property controls how floating labels behave in input components. The available options are:

    • Never - The label never floats above the input, even when focused or filled
    • Always - The label always remains floating above the input field
    • Auto - The label floats above the input when focused or when the input contains a value
    The Auto mode provides the most intuitive user experience for most scenarios.

    Placeholder

    Gets or sets the placeholder text to be displayed in the input component when it's empty.

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

    A string containing the placeholder text, or null if no placeholder is specified.

    Remarks

    Placeholder text provides users with hints about the expected input format or content. The placeholder is displayed in a lighter color and disappears when the user starts typing or when the input receives focus.

    Readonly

    Gets or sets a value indicating whether the input component is in read-only mode.

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

    true if the input is read-only; otherwise, false.

    Remarks

    When set to true, the input component displays its value but prevents user modification. Read-only inputs can still receive focus and allow text selection, but users cannot edit the content. This is useful for displaying data that should be visible but not editable.

    ShowClearButton

    Gets or sets a value indicating whether to display a clear button in the input component.

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

    true to show the clear button; otherwise, false.

    Remarks

    When enabled, a clear button (typically an 'X' icon) appears within the input component, allowing users to quickly clear the input value with a single click. The button only appears when the input contains text.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved