{"id":50720724,"url":"https://github.com/stevdza-san/CountryPicker-KMP","last_synced_at":"2026-06-27T00:01:05.183Z","repository":{"id":303480488,"uuid":"1014271734","full_name":"stevdza-san/CountryPicker-KMP","owner":"stevdza-san","description":"A lightweight KMP library that simplifies country selection by providing Country enum with Dial codes, Currencies, Flags and ISO codes—Adopted for Android, iOS, Desktop, and Web.","archived":false,"fork":false,"pushed_at":"2025-07-27T21:03:59.000Z","size":433,"stargazers_count":35,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-27T06:35:15.486Z","etag":null,"topics":["android","compose-multiplatform","country-picker","desktop","ios","kotlin","kotlin-js","kotlin-multiplatform","kotlin-wasm","web"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stevdza-san.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-07-05T11:38:53.000Z","updated_at":"2026-01-21T12:52:33.000Z","dependencies_parsed_at":"2025-07-07T23:11:54.707Z","dependency_job_id":null,"html_url":"https://github.com/stevdza-san/CountryPicker-KMP","commit_stats":null,"previous_names":["stevdza-san/countrypicker-kmp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stevdza-san/CountryPicker-KMP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevdza-san%2FCountryPicker-KMP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevdza-san%2FCountryPicker-KMP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevdza-san%2FCountryPicker-KMP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevdza-san%2FCountryPicker-KMP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevdza-san","download_url":"https://codeload.github.com/stevdza-san/CountryPicker-KMP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevdza-san%2FCountryPicker-KMP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34835785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","compose-multiplatform","country-picker","desktop","ios","kotlin","kotlin-js","kotlin-multiplatform","kotlin-wasm","web"],"created_at":"2026-06-10T00:00:28.581Z","updated_at":"2026-06-27T00:01:05.172Z","avatar_url":"https://github.com/stevdza-san.png","language":"Kotlin","funding_links":["https://ko-fi.com/stevdza_san"],"categories":["Libraries"],"sub_categories":["📱 Device"],"readme":"# \u003cp align=\"center\"\u003e🚩 Country Picker KMP\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"ASSETS/components.png\" href=\"\"\u003e\n\u003c/p\u003e\n\nYou've just started a new project and need to implement a feature that allows users to select a `country`, `phone number`, `dial code`, or `currency` and you're realizing it involves a lot of boilerplate: managing country data, handling `flags`, and building a clean UI. This library is built to solve exactly that. It provides a powerful yet simple `Country` enum class that includes all these information for you. But it doesn’t stop there. To make integration even better, the library includes two prebuilt UI components:\n\n  `CountryPickerDialog`: A searchable dialog that allows users to browse and select from a list of countries.\n\n  `CountryPickerField`: A UI component similar to a TextField that displays the currently selected country and opens the picker dialog on click.\n\nThis is a lightweight and fully customizable Kotlin Multiplatform (KMP) solution designed to work seamlessly across Android, iOS, Desktop, Kotlin/JS and Kotlin/WASM targets.\n\n\n## ✨ Features\n\n- ✅ Predefined list of countries with:\n  - Name\n  - Dial code\n  - Currency\n  - ISO code\n  - Flag resource\n- ✅ Built-in `CountryPickerDialog` and `CountryPickerField` Composables\n- ✅ Real-time search support\n- ✅ Multiple display options: Dial Code, Currency, Name\n- ✅ Kotlin Multiplatform ready (Android, iOS, Desktop, WASM)\n\n\n\n### Gradle\n\nMake sure to include the library in your `commonMain` source set:\n\n```kotlin\nimplementation(\"com.stevdza-san:countrypicker:1.0.5\")\n```\n\nOr a version catalog (libs.versions.toml)\n```kotlin\n[versions]\ncountry-picker = \"1.0.5\"\n\n[libraries]\ncountry-picker-kmp = { module = \"com.stevdza-san:countrypicker\", version.ref = \"country-picker\" }\n```\n\n## Usage\n### Show Country Picker Dialog\n\n```kotlin\nvar selectedCountry by remember { mutableStateOf(Country.Serbia) }\nvar showDialog by remember { mutableStateOf(false) }\n\nAnimatedVisibility(visible = showDialog) {\n    CountryPickerDialog(\n        selectedCountry = selectedCountry,\n        onConfirmClick = { country -\u003e\n            selectedCountry = country\n            showDialog = false\n        },\n        onDismiss = { showDialog = false }\n    )\n}\n\nCountryPickerField(\n    selectedCountry = selectedCountry,\n     onClick = { showDialog = true }\n)\n```\n\n## Display Options\n\n### Choose how to display the country label:\n\n```kotlin\nenum class CountryDisplayOption {\n    NAME,\n    CURRENCY,\n    DIAL_CODE,\n    ISO_CODE,\n    DIAL_CODE_AND_NAME,\n    NAME_AND_CURRENCY,\n    NAME_AND_ISO_CODE\n}\n```\n\n### Data Model\n\n```kotlin\nenum class Country(\n    val dialCode: Int,\n    val currency: String,\n    val flag: DrawableResource,\n    val isoCode: String\n)\n```\n\n### To get all available countries:\n\n```kotlin\nval allCountries = Country.entries\n```\n\n## Like what you see? :yellow_heart:\n⭐ Give a star to this repository. \u003cbr /\u003e\n☕ Let's get a coffee. You're paying!😜 https://ko-fi.com/stevdza_san\n\n# License\n```xml\nDesigned and developed by stevdza-san (Stefan Jovanović)\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%2Fstevdza-san%2FCountryPicker-KMP","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevdza-san%2FCountryPicker-KMP","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevdza-san%2FCountryPicker-KMP/lists"}