KPSingleLineOutlinedTextField

fun KPSingleLineOutlinedTextField(style: OutlinedTextFieldStyle, value: String, modifier: Modifier = Modifier, label: String? = null, placeholder: String? = null, errorLabel: String? = null, isError: Boolean = false, enabled: Boolean = true, colors: TextFieldColors = style.outlinedTextFieldColors, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardActions: KeyboardActions = KeyboardActions.Default, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onValueChange: (String) -> Unit, trailingContent: @Composable TextFieldScope.() -> Unit? = null)

Composable function to create a single-line text input field with an outlined style.

Parameters

style

Style configuration for the TextField. This should be an object implementing the OutlinedTextFieldStyle interface.

value

The initial value for the TextField.

modifier

Modifier used to shape the TextField.

label

The label text to display above the TextField.

placeholder

The placeholder text to display when the TextField is empty.

errorLabel

The error message to display below the TextField when there is an error.

isError

Indicates whether the TextField is in an error state.

enabled

Determines if the TextField is enabled for interaction.

colors

The colors configuration for the TextField. This parameter allows configuring the colors of the TextField component, including the text color, background color, and colors for different states (such as selected, focused, disabled, etc.).

visualTransformation

Transforms the visual representation of the input value. For example, you can use it to add unit suffixes like "cm" or "kg".

keyboardActions

Configuration of keyboard actions to be triggered when the input service emits an IME action. Actions specified here will be triggered in addition to the default actions performed by TextField.

interactionSource

The MutableInteractionSource representing the stream of Interactions for this TextField. You can create and pass in your own remembered MutableInteractionSource if you want to observe Interactions and customize the appearance / behavior of this TextField in different Interactions.

onValueChange

Callback for when the value of the TextField changes.

trailingContent

Optional trailing container that can be either a KPIcon or KPText. The container will be placed at the end of the TextField.