A basic widget for getting the user input is a text field. Keyboard and mouse can be used for providing or changing data
Note: You don't need Col to control the width in the compact mode.
| Property | Description | Type | Default |
|---|---|---|---|
addonAfter | The label text displayed after (on the right side of) the input field. | string|ReactNode | |
addonBefore | The label text displayed before (on the left side of) the input field. | string|ReactNode | |
defaultValue | The initial input content | string | |
disabled | Whether the input is disabled. | false | |
id | The ID for input | string | |
maxLength | max length | number | |
prefix | The prefix icon for the Input. | string|ReactNode | |
size | The size of the input box. Note: in the context of a form, the large size is used. | large | middle | small | |
suffix | The suffix icon for the Input. | string|ReactNode | |
type | string | text | |
value | The input content value | string | |
onChange | callback when user input | function(e) | |
onPressEnter | The callback function that is triggered when Enter key is pressed. | function(e) | |
allowClear | allow to remove input content with clear icon | boolean | |
| Property | Description | Type | Default |
|---|---|---|---|
enterButton | to show an enter button after input. This property conflicts with the addonAfter property. | boolean|ReactNode | false |
onSearch | The callback function triggered when you click on the search-icon, the clear-icon or press the Enter key. | function(value, event) | |
loading | Search box with loading. | boolean |
| Property | Description | Type | Default |
|---|---|---|---|
compact | Whether use compact style | boolean | false |
size | The size of Input.Group specifies the size of the included InputM fields. Available: large default small | string | default |
| Property | Description | Type | Default |
|---|---|---|---|
visibilityToggle | Whether show toggle button | boolean | true |
| Property | Description | Type | Default |
|---|---|---|---|
autoSize | Height autosize feature, can be set to true|false or an object { minRows: 2, maxRows: 6 }. | boolean|object | false |
defaultValue | The initial input content | string | |
value | The input content value | string | |
onPressEnter | The callback function that is triggered when Enter key is pressed. | function(e) | |
allowClear | allow to remove input content with clear icon | boolean | |
onResize | The callback function that is triggered when resize | function({ width, height }) |
| Property | Description | Type | Default |
|---|---|---|---|
mask |
Mask string. Default format characters are:
9: 0-9
a: A-Z, a-z
*: A-Z, a-z, 0-9
| string | - |
maskChar | Character to cover unfilled parts of the mask | string | " " |
formatChars | Defines format characters with characters as a keys and corresponding RegExp strings as a values | object |
{
'9': '[0-9]',
'a': '[A-Za-z]',
'*': '[A-Za-z0-9]'
}
|
alwaysShowMask | Show mask when input is empty and has no focus. | boolean | - |