A beautiful, fully customizable country picker component for Android with Jetpack Compose support.
- 🎨 Fully Customizable - Colors, fonts, shapes.
- 🔍 Smart Search - Filter by name, code, or dial code.
- 🌍 50+ Countries - Built-in list with flags.
- 📱 Material Design 3 - Modern UI.
- ⚡ Lightweight - Pure Kotlin & Compose.
Add to your module's build.gradle.kts:
dependencies {
// For Jetpack Compose
implementation("com.github.Jaypatelbond.CountryPicker:compose:v1.1.2")
// For Views / Fragments
implementation("com.github.Jaypatelbond.CountryPicker:view:v1.1.2")
// Core (Data only)
implementation("com.github.Jaypatelbond.CountryPicker:core:v1.1.2")
}@Composable
fun MyScreen() {
var showPicker by remember { mutableStateOf(false) }
var selectedCountry by remember { mutableStateOf<Country?>(null) }
Button(onClick = { showPicker = true }) {
Text("Select Country")
}
if (showPicker) {
CountryPickerBottomSheet(
onDismiss = { showPicker = false },
onCountrySelected = { country ->
selectedCountry = country
showPicker = false
}
)
}
}Customize the look and feel easily:
CountryPickerBottomSheet(
onDismiss = { showPicker = false },
onCountrySelected = { /* ... */ },
style = CountryPickerStyle(
titleText = "Select Location",
titleColor = Color(0xFF6200EE),
searchHintText = "Search...",
enableItemAnimation = true
)
)You can show all countries, a specific list, or block certain ones.
// Show only specific countries
val europeanCountries = listOf(
Country("France", "FR", "+33"),
Country("Germany", "DE", "+49")
)
CountryPickerBottomSheet(
// ...
customCountryList = europeanCountries
)Click to expand Fragment implementation details
val picker = CountryPickerBottomSheetFragment().apply {
onCountrySelectedListener = { country ->
Toast.makeText(context, "Selected: ${country.name}", Toast.LENGTH_SHORT).show()
}
}
picker.show(supportFragmentManager, "CountryPicker")Contributions are welcome! See CONTRIBUTING.md for guidelines.
MIT License. See LICENSE for details.


