EquinoxOutlinedTextField

fun EquinoxOutlinedTextField(    modifier: Modifier = Modifier,     outlinedTextFieldStyle: TextStyle = LocalTextStyle.current,     outlinedTextFieldColors: TextFieldColors = OutlinedTextFieldDefaults.colors(),     width: Dp = 300.dp,     value: MutableState<String>,     mustBeInLowerCase: Boolean = false,     allowsBlankSpaces: Boolean = true,     maxLines: Int = 1,     validator: (String) -> Boolean? = null,     isError: MutableState<Boolean> = remember { mutableStateOf(false) },     onValueChange: (String) -> Unit = { defaultOnValueChange(validator, isError, value, mustBeInLowerCase, allowsBlankSpaces, it) },     label: StringResource? = null,     labelStyle: TextStyle = LocalTextStyle.current,     placeholder: StringResource? = null,     placeholderStyle: TextStyle = LocalTextStyle.current,     errorText: StringResource? = null,     errorTextStyle: TextStyle = LocalTextStyle.current,     trailingIcon: @Composable () -> Unit? = { IconButton( onClick = { value.value = "" } ) { Icon( imageVector = Icons.Default.Clear, contentDescription = null ) } },     visualTransformation: VisualTransformation = VisualTransformation.None,     keyboardOptions: KeyboardOptions = KeyboardOptions.Default,     keyboardActions: KeyboardActions = KeyboardActions.Default,     enabled: Boolean = true,     readOnly: Boolean = false,     leadingIcon: @Composable () -> Unit? = null,     prefix: @Composable () -> Unit? = null,     suffix: @Composable () -> Unit? = null,     supportingText: @Composable () -> Unit? = null,     minLines: Int = 1,     interactionSource: MutableInteractionSource? = null,     shape: Shape = OutlinedTextFieldDefaults.shape)
fun EquinoxOutlinedTextField(    modifier: Modifier = Modifier,     outlinedTextFieldStyle: TextStyle = LocalTextStyle.current,     outlinedTextFieldColors: TextFieldColors = OutlinedTextFieldDefaults.colors(),     width: Dp = 300.dp,     value: MutableState<String>,     mustBeInLowerCase: Boolean = false,     allowsBlankSpaces: Boolean = true,     maxLines: Int = 1,     validator: (String) -> Boolean? = null,     isError: MutableState<Boolean> = remember { mutableStateOf(false) },     onValueChange: (String) -> Unit = { defaultOnValueChange(validator, isError, value, mustBeInLowerCase, allowsBlankSpaces, it) },     label: String? = null,     labelStyle: TextStyle = LocalTextStyle.current,     placeholder: String? = null,     placeholderStyle: TextStyle = LocalTextStyle.current,     errorText: String? = null,     errorTextStyle: TextStyle = LocalTextStyle.current,     trailingIcon: @Composable () -> Unit? = { IconButton( onClick = { value.value = "" } ) { Icon( imageVector = Icons.Default.Clear, contentDescription = null ) } },     visualTransformation: VisualTransformation = VisualTransformation.None,     keyboardOptions: KeyboardOptions = KeyboardOptions.Default,     keyboardActions: KeyboardActions = KeyboardActions.Default,     enabled: Boolean = true,     readOnly: Boolean = false,     leadingIcon: @Composable () -> Unit? = null,     prefix: @Composable () -> Unit? = null,     suffix: @Composable () -> Unit? = null,     supportingText: @Composable () -> Unit? = null,     minLines: Int = 1,     interactionSource: MutableInteractionSource? = null,     shape: Shape = OutlinedTextFieldDefaults.shape)

Custom implementation of a OutlinedTextField

Parameters

modifier

The modifier of the text field

outlinedTextFieldStyle

The style to apply to the OutlinedTextField

outlinedTextFieldColors

The colors to use for the OutlinedTextField

width

The width of the text field

value

The action to execute when the alert dialog has been dismissed

mustBeInLowerCase

Whether the input must be in lower case format

allowsBlankSpaces

Whether the input can contain blank spaces or not

maxLines

the maximum height in terms of maximum number of visible lines. It is required that 1 <= minLines<= maxLines.

validator

The function to invoke to validate the input

isError

indicates if the text field's current value is in error. If set to true, the label, bottom indicator and trailing icon by default will be displayed in error color

onValueChange

the callback that is triggered when the input service updates the text. An updated text comes as a parameter of the callback

label

the optional label to be displayed inside the text field container. The default text style for internal Text is Typography.bodySmall when the text field is in focus and Typography.bodyLarge when the text field is not in focus

labelStyle

The style to apply to the label

placeholder

the optional placeholder to be displayed when the text field is in focus and the input text is empty. The default text style for internal Text is Typography.bodyLarge

placeholderStyle

The style to apply to the placeholder

errorText

The error text to display if isError is true

errorTextStyle

The style to apply to the error text

trailingIcon

the optional trailing icon to be displayed at the end of the text field container

visualTransformation

transforms the visual representation of the input value For example, you can use PasswordVisualTransformation to create a password text field. By default, no visual transformation is applied.

keyboardOptions

software keyboard options that contains configuration such as KeyboardType and ImeAction

keyboardActions

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

enabled

controls the enabled state of this text field. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services.

readOnly

controls the editable state of the text field. When true, the text field cannot 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 a user cannot edit.

leadingIcon

the optional leading icon to be displayed at the beginning of the text field container

prefix

the optional prefix to be displayed before the input text in the text field

suffix

the optional suffix to be displayed after the input text in the text field

supportingText

the optional supporting text to be displayed below the text field

minLines

the minimum height in terms of minimum number of visible lines. It is required that 1 <= minLines<= maxLines.

interactionSource

an optional hoisted MutableInteractionSource for observing and emitting Interactions for this text field. You can use this to change the text field's appearance or preview the text field in different states. Note that if null is provided, interactions will still happen internally.

shape

defines the shape of this text field's border