androidx.compose.foundation.text.input

InputTransformation

Fun interface · from org.jetbrains.compose.foundation:foundation:1.12.2

No hand-written docs yet.

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

fun interface InputTransformation

Used by

Parameters that take a InputTransformation.

Properties

keyboardOptions

val keyboardOptions: KeyboardOptions?

Optional KeyboardOptions that will be used as the default keyboard options for configuring the IME. The options passed directly to the text field composable will always override this.

Functions

applySemantics

fun SemanticsPropertyReceiver.applySemantics()

Optional semantics configuration that can update certain characteristics of the applied TextField, e.g. SemanticsPropertyReceiver.maxTextLength.

transformInput

fun TextFieldBuffer.transformInput()

The transform operation. For more information see the documentation on InputTransformation.

Library docs

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

Input transformations are ran after hardware and software keyboard events, when text is pasted or dropped into the field, or when an accessibility service changes the text.

To chain filters together, call then.

Prebuilt filters are provided for common filter operations. See:

  • InputTransformation.maxLength``()
  • InputTransformation.allCaps``()