Kwik Outlined Text Field
A versatile filled text field component that can be used to take user input.
Parameters
: The modifier for the text field.
: The value of the text field.
: The callback that will be called when the value of the text field changes.
: The callback that will be called when the keyboard action is done.
: The callback that will be called when the action icon is clicked.
: The callback that will be called when the focus of the text field changes.
: The visual transformation of the text field. Refer to VisualTransformation.
: If true, the text field is editable. Default is true.
: The placeholder text of the text field.
: The shape of the text field. Default is RoundedCornerShape.
: If true, the text field will display an error state.
: The error message to display when isError is true.
: If true, the text field will be single line. Default is true.
: The maximum length of the text field. Default is 35.
: The keyboard type of the text field. Default is KeyboardType.Text.
: The keyboard actions of the text field. Default is KeyboardActions with onDone action.
: The maximum number of lines of the text field. Default is 1.
: The allowed characters in the text field. Default is AllowedChars.ALL.
: The IME action of the text field. Default is ImeAction.Done.
: If true, the text field will display a valid state.
: If true, the text counter will be shown.
: The hint text of the text field.
: If true, the hint will be visible only when there is an error.
: The leading icon of the text field.
: The trailing icon of the text field.
: If true, the clear text button will be shown.
: If true, the loading indicator will be shown.
: If true, the text field will be big.
: If true, the text field will be enabled. Default is true.
: The colors of the text field. Default is OutlinedTextFieldDefaults.colors.
Example usage:
val pirateName = rememberSaveable(stateSaver = TextFieldValue.Saver) {
mutableStateOf(TextFieldValue(""))
}
KwikOutlinedTextField(
value = pirateName,
onValueChange = {
pirateName.value = it
},
placeholder = "Jack Sparrow",
keyboardType = KeyboardType.Phone,
visualTransformation = VisualTransformation.None,
imeAction = ImeAction.Done,
)