KPInputPhoneNumberField

fun KPInputPhoneNumberField(countryCode: String, number: String, onCountryCodeClick: () -> Unit, onValueChange: (String) -> Unit?, modifier: Modifier = Modifier, enabled: Boolean = true, countryCodeLabel: String = "", numberLabel: String = "", error: String? = null, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default.copy(keyboardType = KeyboardType.Phone), keyboardActions: KeyboardActions = KeyboardActions.Default, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, shape: Shape = MaterialTheme.shapes.small, maxPhoneNumberLength: Int = 10)

Composable function representing a phone number input field with customizable appearance and behavior tailored for the Komposto theme.

Parameters

countryCode

The current value of the country code input field.

number

The current value of the phone number input field.

onCountryCodeClick

Callback invoked when the country code input field is clicked.

onValueChange

Callback invoked when the value of the phone number input field changes.

modifier

Optional Modifier that can be applied to the input field.

enabled

Indicates whether the input field is enabled for user interaction.

countryCodeLabel

Optional label for the country code input field.

numberLabel

Optional label for the phone number input field.

error

Optional error message displayed below the input fields if there is an error. If it's null no error will be displayed.

visualTransformation

VisualTransformation applied to the phone number input field.

keyboardActions

KeyboardActions defining keyboard actions for the phone number input field. If you don't provide one it will clear keyboard after any action.

interactionSource

MutableInteractionSource representing the source of user interactions.

shape

Shape of the only phone number input field.

maxPhoneNumberLength

Maximum length allowed for the phone number.