Class IInput
Defines the default required properties and configuration options for input components.
Inheritance
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 |
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 |
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 |
|
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 |
|
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 |
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
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 |
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 |
|
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 |
|
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.