🌈 Create new beautiful Compose Gradients with our new wesite ->
Interface

InputTransformation

A function that is ran after every change made to a TextFieldState by user input and can change or reject that input.

BasicTextFieldCustomInputTransformationSample

@Sampled
@Composable
fun BasicTextFieldCustomInputTransformationSample() {
    // Demonstrates how to create a custom and relatively complex InputTransformation.
    val state = remember { TextFieldState() }
    BasicTextField(
        state,
        inputTransformation =
            InputTransformation {
                // A filter that always places newly-input text at the start of the string, after a
                // prompt character, like a shell.
                val promptChar = '>'