Phone Number Input
A highly customizable international phone number input component with country selection.
State is managed by PhoneState, which can be hoisted to the caller for external control:
val phoneState = rememberPhoneState()
PhoneNumberInput(state = phoneState, ...)
// Elsewhere: phoneState.clearPhone(), phoneState.isValid, phoneState.toPhone()Parameters
Modifier applied to the outermost layout (Column containing field + error text).
Hoistable state holder. Defaults to an internal rememberPhoneState.
Placeholder text shown when the input is empty.
Floating label shown notched into the field's outline. Only rendered when CCPConfig.showLabel is true (off by default, matching the field's previous no-label look) — pass both to give the field a label.
Deprecated – use onValueChange.
Callback invoked on every change, providing a Phone snapshot.
Optional initial phone number (E.164 or local format).
Optional ISO code or country name to preselect (e.g. "KE", "Kenya").
Whitelist of ISO codes shown in the country selector. Empty = all.
Blacklist of ISO codes hidden from the country selector.
ISO codes pinned to a "Suggested" section at the top of the sheet.
Whether to show the error border and errorMessage.
Text displayed below the field when isError is true.
Color configuration.
Behavior and UI configuration.
Called when the keyboard "Done" action is pressed and the number is valid.