Package-level declarations

The original PhoneNumberInput component and its dropdown/bottom-sheet pickers. Fully supported; runs on the country-picker foundation internally.

The original PhoneNumberInput component and its dropdown/bottom-sheet pickers. Fully supported; runs on the country-picker foundation internally.

Functions

Link copied to clipboard
fun CountriesBottomSheet(modifier: Modifier = Modifier, onDismiss: () -> Unit = {}, onSelectCountries: (Country) -> Unit, sheetState: SheetState, countriesToShow: List<String> = emptyList(), countriesExclude: List<String> = emptyList(), pinnedCountries: List<String> = emptyList(), ccpColors: CCPColors = CCPDefaults.colors(), ccpConfig: CCPConfig = CCPDefaults.defaultConfig())
Link copied to clipboard
fun CountriesDropdown(expanded: Boolean, onDismiss: () -> Unit, onSelectCountry: (Country) -> Unit, countriesToShow: List<String> = emptyList(), countriesExclude: List<String> = emptyList(), pinnedCountries: List<String> = emptyList(), ccpColors: CCPColors = CCPDefaults.colors(), ccpConfig: CCPConfig = CCPDefaults.defaultConfig(), modifier: Modifier = Modifier, dropdownOffset: DpOffset = DpOffset.Zero)

A compact, searchable dropdown for country selection, anchored below the country selector button. Intended as an alternative to CountriesBottomSheet for tablets, landscape layouts, or forms where a full-screen modal feels too heavy.

Link copied to clipboard
fun CountryGridItem(modifier: Modifier = Modifier, onClick: (Country) -> Unit = {}, country: Country, ccpColors: CCPColors = CCPDefaults.colors(), ccpConfig: CCPConfig = CCPDefaults.defaultConfig())

Compact grid cell showing flag, ISO code, and dial code. Used in grid layout mode.

Link copied to clipboard
fun CountryHeader(modifier: Modifier = Modifier, header: String, headerColor: Color = Color.Black, headerStyle: TextStyle = MaterialTheme.typography.titleMedium, headerDividerColor: Color = Color.Black.copy(alpha = .1f), showDivider: Boolean = true)
Link copied to clipboard
fun CountryItem(modifier: Modifier = Modifier, onClick: (Country) -> Unit = {}, country: Country, ccpColors: CCPColors = CCPDefaults.colors(), ccpConfig: CCPConfig = CCPDefaults.defaultConfig())

Full-width list item showing flag, name, and dial code. Used in list layout mode.

Link copied to clipboard
fun PhoneNumberInput(modifier: Modifier = Modifier, state: PhoneState = rememberPhoneState(), phoneHint: String = "Enter phone", label: String? = "Phone number", onPhoneValueChange: (formatedPhone: String, unFormatedPhone: String, valid: Boolean) -> Unit = { _, _, _ -> }, onValueChange: (Phone) -> Unit = {}, value: String = "", setCountry: String? = null, countriesToShow: List<String> = emptyList(), countriesExclude: List<String> = emptyList(), pinnedCountries: List<String> = emptyList(), isError: Boolean = false, errorMessage: String? = null, colors: CCPColors = CCPDefaults.colors(), ccpConfig: CCPConfig = CCPDefaults.defaultConfig(), onDone: () -> Unit = {})

A highly customizable international phone number input component with country selection.

Link copied to clipboard
fun SearchComponent(modifier: Modifier = Modifier, searchState: SearchState = SearchState(), onValueChange: (String) -> Unit = {}, searchHint: String = "Search Countries", onClose: () -> Unit = {}, ccpColors: CCPColors = CCPDefaults.colors(), ccpConfig: CCPConfig = CCPDefaults.defaultConfig())
Link copied to clipboard
fun SelectedCountryComponent(modifier: Modifier = Modifier, selectedCountry: Country? = countryList.find { it.code == "US" }, onSelectCountry: (Country) -> Unit = {}, countriesToShow: List<String> = emptyList(), countriesExclude: List<String> = emptyList(), pinnedCountries: List<String> = emptyList(), ccpColors: CCPColors = CCPDefaults.colors(), ccpConfig: CCPConfig = CCPDefaults.defaultConfig(), onDropdownExpand: () -> Unit? = null)

Displays the currently selected country (flag + dial code) and opens a CountriesBottomSheet when tapped.

Link copied to clipboard
fun SheetContent(modifier: Modifier = Modifier, searchState: CountrySearchState = rememberCountrySearchState(), onSelectCountries: (Country) -> Unit = {}, ccpColors: CCPColors = CCPDefaults.colors(), ccpConfig: CCPConfig = CCPDefaults.defaultConfig())
Link copied to clipboard
fun Context.showToast(message: String)
Link copied to clipboard
fun SortComponent(modifier: Modifier = Modifier, listStyle: CountryListStyle = CountryListStyle.List, onToggle: (CountryListStyle) -> Unit = {}, ccpColors: CCPColors = CCPDefaults.colors())