Input keyboard type - Android

In Jetpack Compose, you can set a keyboard type by using the KeyboardType class in keyboardOptions property of TextField.

The following constants are defined for KeyboardType:

Example of using KeyboardType:

TextField(
    value = "",
    onValueChange = { /* State update logic */ },
    keyboardOptions = KeyboardOptions.Default.copy(keyboardType = KeyboardType.Number)
)