Fiori Simple Text Field
The composable FioriSimpleTextField component.
The FioriTextFieldTestTags class serves as a comprehensive collection of test tags for the various components used in the FioriSimpleTextField. This class is particularly beneficial for automated testing, ensuring that each UI component is properly identified and tested in accordance with best practices.
Parameters
the input String text to be shown in the FioriSimpleTextField
the callback that is triggered when the input service updates the text. An updated text comes as a parameter of the callback.
a Modifier object that defines the height/width of the text field.
controls the enabled state of the FioriSimpleTextField. When false, the text field will be neither editable nor focusable, the input of the text field will not be selectable
controls the editable state of the FioriSimpleTextField. When true, the text field can not be modified, however, a user can focus it and copy text from it. Read-only text fields are usually used to display pre-filled forms that user can not edit
the maximum height in terms of maximum number of visible lines. Should be equal or greater than 1. Note that this parameter will be ignored and instead maxLines will be set to 1 if readonly is set to false.
to enable or disable the ability to select the value text in readOnly states. By default, it was true.
controls the error state of the FioriSimpleTextField, When true, the error icon was shown in the text field and error message was showing in helper text area
an Enum object TextInputInteractionState to present the interaction state with trailing icon for this FioriSimpleTextField. With the default NORMAL state, the specified trailing icon through TrailingIcon object will not be presented when the text field was on focused base on some conditions. At the same time, a cancel icon was presented to clear all inputs when the text field which has input was focused and an error icon was presented when the text field input was invalid. With the INTERACTIVE state which was the opposite of NORMAL state, the cancel icon and the error icon will not be presented and it only take effect when the text field has declared trailing icon. E,g the Password text field
an FioriTextFieldContent object to declare all necessary information of FioriSimpleTextField
the optional leading icon to be displayed at the beginning of the text field container. The prefixText in FioriTextFieldContent will be ignored when the leading icon was presented.
the optional trailing icon to be displayed at the end of the text field container
FioriTextFieldTextStyles that will be used to determine the text style of the text field parts in different state. See FioriTextFieldDefaults.textStyles to customize
FioriTextFieldColors that will be used to determine the color of the text field parts in different state. See FioriTextFieldDefaults.colors to customize
FioriTextFieldStyles that will be used to determine the style of the text field parts in different state. E,g, the padding, height. See FioriTextFieldDefaults.styles to customize
software keyboard options that contains configuration such as KeyboardType and ImeAction.
when the input service emits an IME action, the corresponding callback is called. Note that this IME action may be different from what you specified in KeyboardOptions.imeAction.
The visual transformation filter for changing the visual representation of the input. By default no visual transformation is applied.
the MutableInteractionSource representing the stream of Interactions for this text field.
This optional callback function is called when the hyperlink in the inline notice is clicked.
The composable FioriSimpleTextField component.
The FioriTextFieldTestTags class serves as a comprehensive collection of test tags for the various components used in the FioriSimpleTextField. This class is particularly beneficial for automated testing, ensuring that each UI component is properly identified and tested in accordance with best practices.
Parameters
The TextFieldValue to be shown in the FioriSimpleTextField.
Called when the input service updates the values in FioriSimpleTextField.
a Modifier object that defines the height/width of the text field.
controls the enabled state of the FioriSimpleTextField. When false, the text field will be neither editable nor focusable, the input of the text field will not be selectable
controls the editable state of the FioriSimpleTextField. When true, the text field can not be modified, however, a user can focus it and copy text from it. Read-only text fields are usually used to display pre-filled forms that user can not edit
the maximum height in terms of maximum number of visible lines. Should be equal or greater than 1. Note that this parameter will be ignored and instead maxLines will be set to 1 if readonly is set to false.
to enable or disable the ability to select the value text in readOnly states. By default, it was true.
controls the error state of the FioriSimpleTextField, When true, the error icon was shown in the text field and error message was showing in helper text area
an Enum object TextInputInteractionState to present the interaction state with trailing icon for this FioriSimpleTextField. With the default NORMAL state, the specified trailing icon through TrailingIcon object will not be presented when the text field was on focused base on some conditions. At the same time, a cancel icon was presented to clear all inputs when the text field which has input was focused and an error icon was presented when the text field input was invalid. With the INTERACTIVE state which was the opposite of NORMAL state, the cancel icon and the error icon will not be presented and it only take effect when the text field has declared trailing icon. E,g the Password text field
an FioriTextFieldContent object to declare all necessary information of FioriSimpleTextField
the optional leading icon to be displayed at the beginning of the text field container. The prefixText in FioriTextFieldContent will be ignored when the leading icon was presented.
the optional trailing icon to be displayed at the end of the text field container
FioriTextFieldTextStyles that will be used to determine the text style of the text field parts in different state. See FioriTextFieldDefaults.textStyles to customize
FioriTextFieldColors that will be used to determine the color of the text field parts in different state. See FioriTextFieldDefaults.colors to customize
FioriTextFieldStyles that will be used to determine the style of the text field parts in different state. E,g, the padding, height. See FioriTextFieldDefaults.styles to customize
software keyboard options that contains configuration such as KeyboardType and ImeAction.
when the input service emits an IME action, the corresponding callback is called. Note that this IME action may be different from what you specified in KeyboardOptions.imeAction.
The visual transformation filter for changing the visual representation of the input. By default no visual transformation is applied.
the MutableInteractionSource representing the stream of Interactions for this text field.
This optional callback function is called when the hyperlink in the inline notice is clicked.