{"id":21898506,"url":"https://github.com/canopas/compose-country-picker","last_synced_at":"2025-07-19T08:34:09.039Z","repository":{"id":40412566,"uuid":"452240365","full_name":"canopas/compose-country-picker","owner":"canopas","description":"Android - Country code bottomsheet picker in Jetpack Compose","archived":false,"fork":false,"pushed_at":"2024-12-26T08:43:42.000Z","size":2684,"stargazers_count":69,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-20T10:08:28.612Z","etag":null,"topics":["android","android-library","androiddev","jetpack","jetpack-compose","jetpack-compose-tutorial","kotlin","kotlin-android","material-design","material-ui"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/canopas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-26T10:56:57.000Z","updated_at":"2025-03-27T07:22:17.000Z","dependencies_parsed_at":"2024-03-06T11:53:47.775Z","dependency_job_id":"2bd69ebe-5183-4a55-89a1-aefff59fff69","html_url":"https://github.com/canopas/compose-country-picker","commit_stats":null,"previous_names":["canopas/jetcountrypicker"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/canopas/compose-country-picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canopas%2Fcompose-country-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canopas%2Fcompose-country-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canopas%2Fcompose-country-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canopas%2Fcompose-country-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canopas","download_url":"https://codeload.github.com/canopas/compose-country-picker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canopas%2Fcompose-country-picker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265905116,"owners_count":23846696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-library","androiddev","jetpack","jetpack-compose","jetpack-compose-tutorial","kotlin","kotlin-android","material-design","material-ui"],"created_at":"2024-11-28T14:32:56.057Z","updated_at":"2025-07-19T08:34:09.007Z","avatar_url":"https://github.com/canopas.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JetCountryPicker\n\nCountry code bottom sheet picker in Jetpack Compose with Search functionality.\n\n\u003cimg src=\"https://github.com/canopas/JetCountrypicker/blob/main/gif/Peek%202022-04-11%2011-46.gif\" /\u003e\n\n## How to add in your project\n\nAvailable on [Maven Central](https://repo1.maven.org/maven2/com/canopas/jetcountrypicker/jetcountrypicker/).\n  \nAdd the dependency\n```gradle\n implementation 'com.canopas.jetcountrypicker:jetcountrypicker:1.0.9'\n```\n\n## How to use ?\n\n```kotlin\n    var openBottomSheet by rememberSaveable { mutableStateOf(false) }\n    var selectedCountry by remember { mutableStateOf\u003cCountry?\u003e(null) }\n    \n    Box {\n        CountryTextField(\n            label = stringResource(R.string.select_country_text),\n            modifier = Modifier\n                .fillMaxWidth()\n                .padding(top = 50.dp, start = 40.dp, end = 40.dp),\n            selectedCountry = selectedCountry,\n            defaultCountry = countryList(LocalContext.current).firstOrNull { it.code == \"IN\" },\n            onShowCountryPicker = {\n                openBottomSheet = true\n            }, isPickerVisible = openBottomSheet\n        )\n    }\n\n    if (openBottomSheet) {\n        CountryPickerBottomSheet(\n            bottomSheetTitle = {\n                Text(\n                    modifier = Modifier\n                        .fillMaxWidth()\n                        .padding(16.dp),\n                    text = stringResource(R.string.select_country_text),\n                    textAlign = TextAlign.Center,\n                    fontWeight = FontWeight.Bold,\n                    fontSize = 20.sp\n                )\n            },\n            containerColor = Color.White,\n            onItemSelected = {\n                selectedCountry = it\n                openBottomSheet = false\n            }, onDismissRequest = {\n                openBottomSheet = false\n            }\n        )\n    }\n```\n\n# Demo\n[Sample](https://github.com/canopas/JetCountrypicker/tree/main/app) app demonstrates how simple the usage of the library actually is.\n\n# Bugs and Feedback\nFor bugs, questions and discussions please use the [Github Issues](https://github.com/canopas/JetCountrypicker/issues).\n\n# Credits\n\nJetCountryPicker is owned and maintained by the [Canopas team](https://canopas.com/). You can follow them on X at [@canopassoftware](https://x.com/canopassoftware) for project updates and releases.\n\n# Licence\n\n```\nCopyright 2022 Canopas Software LLP\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanopas%2Fcompose-country-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanopas%2Fcompose-country-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanopas%2Fcompose-country-picker/lists"}