
Generates Fibonacci sequence from runtime-provided starting numbers; includes tests for each build target and basic publishing setup to Maven Central.
A powerful, flexible, and fully customizable Country Picker & Phone Number Input library for Jetpack Compose and Compose Multiplatform.
Designed for modern apps that need seamless international phone number handling with clean UI and developer-friendly APIs.
+880...)
![]() Country Picker |
![]() Phone Input Field |
![]() Error & Validation |
<dependency>
<groupId>io.github.mdabdulkayum</groupId>
<artifactId>cmp-countrypicker</artifactId>
<version>1.0.9</version>
</dependency>implementation("io.github.mdabdulkayum:cmp-countrypicker:1.0.9")implementation 'io.github.mdabdulkayum:cmp-countrypicker:1.0.9'val pickerState = rememberCountryPickerState()
var isOpen by remember { mutableStateOf(false) }
Button(onClick = { isOpen = true }) {
Text("Select Country")
}
CountryPickerBottomSheet(
state = pickerState,
isOpen = isOpen,
onDismiss = { isOpen = false },
onCountrySelected = { country ->
println("Selected: ${country.name}")
}
)var phoneState by remember {
mutableStateOf(PhoneInputState())
}
PhoneInputField(
state = phoneState,
onStateChange = { phoneState = it }
)var phoneState by remember {
mutableStateOf(PhoneInputState())
}
PhoneInputField(
state = phoneState,
onStateChange = { phoneState = it },
defaultCountry = CountryRepository.getByIso2("BD"),
countryFilter = CountryFilter.Whitelist(
setOf("BD", "US", "IN")
),
allowFormatting = true,
showCountryFlag = true,
showCountryISO2 = true
)Easily customize the look and behavior:
PhoneInputField(
state = state,
onStateChange = { },
theme = CountryPickerThemeDefaults.light(),
showCountryCode = true,
showCountryFlag = true,
showCountryISO2 = false
)Control which countries are visible:
// Show all
CountryFilter.All
// Only specific countries
CountryFilter.Whitelist(setOf("US", "BD", "IN"))
// Exclude countries
CountryFilter.Blacklist(setOf("PK", "AF"))val state = PhoneInputState.fromFullNumber("+8801712345678")allowFormatting = trueEasily mark a field as required by adding * to the label.
The library will automatically render the * in red color, keeping your UI clean and consistent.
PhoneInputField(
state = phoneState,
onStateChange = { phoneState = it },
label = "Phone Number *"
)"Phone Number" → displayed as normal text"*" → automatically styled in red
The label is internally parsed and styled using AnnotatedString:
fun buildRequiredLabel(label: String): AnnotatedString {
return buildAnnotatedString {
append(label.replace("*", "").trim())
append(" ")
withStyle(style = SpanStyle(color = Color.Red)) {
append("*")
}
}
}* is present+880)+1, +1-268)Contributions are welcome!
MIT License © 2026
If you like this project:
Md. Abdul Kayum
Built with ❤️ using Jetpack Compose & Compose Multiplatform
A powerful, flexible, and fully customizable Country Picker & Phone Number Input library for Jetpack Compose and Compose Multiplatform.
Designed for modern apps that need seamless international phone number handling with clean UI and developer-friendly APIs.
+880...)
![]() Country Picker |
![]() Phone Input Field |
![]() Error & Validation |
<dependency>
<groupId>io.github.mdabdulkayum</groupId>
<artifactId>cmp-countrypicker</artifactId>
<version>1.0.9</version>
</dependency>implementation("io.github.mdabdulkayum:cmp-countrypicker:1.0.9")implementation 'io.github.mdabdulkayum:cmp-countrypicker:1.0.9'val pickerState = rememberCountryPickerState()
var isOpen by remember { mutableStateOf(false) }
Button(onClick = { isOpen = true }) {
Text("Select Country")
}
CountryPickerBottomSheet(
state = pickerState,
isOpen = isOpen,
onDismiss = { isOpen = false },
onCountrySelected = { country ->
println("Selected: ${country.name}")
}
)var phoneState by remember {
mutableStateOf(PhoneInputState())
}
PhoneInputField(
state = phoneState,
onStateChange = { phoneState = it }
)var phoneState by remember {
mutableStateOf(PhoneInputState())
}
PhoneInputField(
state = phoneState,
onStateChange = { phoneState = it },
defaultCountry = CountryRepository.getByIso2("BD"),
countryFilter = CountryFilter.Whitelist(
setOf("BD", "US", "IN")
),
allowFormatting = true,
showCountryFlag = true,
showCountryISO2 = true
)Easily customize the look and behavior:
PhoneInputField(
state = state,
onStateChange = { },
theme = CountryPickerThemeDefaults.light(),
showCountryCode = true,
showCountryFlag = true,
showCountryISO2 = false
)Control which countries are visible:
// Show all
CountryFilter.All
// Only specific countries
CountryFilter.Whitelist(setOf("US", "BD", "IN"))
// Exclude countries
CountryFilter.Blacklist(setOf("PK", "AF"))val state = PhoneInputState.fromFullNumber("+8801712345678")allowFormatting = trueEasily mark a field as required by adding * to the label.
The library will automatically render the * in red color, keeping your UI clean and consistent.
PhoneInputField(
state = phoneState,
onStateChange = { phoneState = it },
label = "Phone Number *"
)"Phone Number" → displayed as normal text"*" → automatically styled in red
The label is internally parsed and styled using AnnotatedString:
fun buildRequiredLabel(label: String): AnnotatedString {
return buildAnnotatedString {
append(label.replace("*", "").trim())
append(" ")
withStyle(style = SpanStyle(color = Color.Red)) {
append("*")
}
}
}* is present+880)+1, +1-268)Contributions are welcome!
MIT License © 2026
If you like this project:
Md. Abdul Kayum
Built with ❤️ using Jetpack Compose & Compose Multiplatform