{"id":13902305,"url":"https://github.com/tfaki/CountryCP","last_synced_at":"2025-07-18T00:31:25.958Z","repository":{"id":208669015,"uuid":"722200580","full_name":"tfaki/CountryCP","owner":"tfaki","description":"Customize your country text field for Jetpack Compose","archived":false,"fork":false,"pushed_at":"2024-01-29T08:28:31.000Z","size":7573,"stargazers_count":51,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-05T19:34:20.378Z","etag":null,"topics":["android-library","composer-library","country-code-picker","country-flags","country-list","country-picker","customizable","jetpack-compose","textfield"],"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/tfaki.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}},"created_at":"2023-11-22T16:43:01.000Z","updated_at":"2024-04-28T01:55:51.000Z","dependencies_parsed_at":"2024-01-29T09:47:10.411Z","dependency_job_id":"a1a3c169-130f-4587-915a-8d27e8b42018","html_url":"https://github.com/tfaki/CountryCP","commit_stats":null,"previous_names":["tfaki/countrycp"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfaki%2FCountryCP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfaki%2FCountryCP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfaki%2FCountryCP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfaki%2FCountryCP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tfaki","download_url":"https://codeload.github.com/tfaki/CountryCP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":214260223,"owners_count":15707060,"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-library","composer-library","country-code-picker","country-flags","country-list","country-picker","customizable","jetpack-compose","textfield"],"created_at":"2024-08-06T22:01:05.553Z","updated_at":"2024-08-06T22:03:13.303Z","avatar_url":"https://github.com/tfaki.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/kotlin-%230095D5.svg?style=for-the-badge\u0026logo=kotlin\u0026logoColor=white\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Android-3DDC84?style=for-the-badge\u0026logo=android\u0026logoColor=white\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Android%20Studio-3DDC84.svg?style=for-the-badge\u0026logo=android-studio\u0026logoColor=white\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mailchi.mp/kotlinweekly/kotlin-weekly-389\"\u003e\u003cimg alt=\"Kotlin Weekly\" src=\"https://skydoves.github.io/badges/kotlin-weekly2.svg\"/\u003e\u003c/a\u003e\n  \u003cimg src=\"https://jitpack.io/v/tfaki/CountryCP.svg\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-Apache_2.0-blue.svg\"\u003e\n\u003c/p\u003e\n\n## CountryCP\nCustomize your country text field for Jetpack Compose\n\n\u003cp align=\"start\"\u003e\n \u003cimg src=\"assets/countrycp.png\" width=\"500\" height=\"450\"/\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"start\"\u003e \u003ch3 align=\"start\"\u003eGIF\u003c/h1\u003e \u003c/div\u003e\n\n\u003cp align=\"start\"\u003e\n \u003cimg src=\"assets/countrycp.GIF\" width=\"40%\"/\u003e\n\u003c/p\u003e\n\n## Usage\n```kotlin\n  val phoneNumber = remember { mutableStateOf(\"\") }\n  val showError = remember { mutableStateOf(false) }\n\n  CountryCP(\n     modifier = Modifier\n      .background(Color.White)\n      .fillMaxWidth()\n      .padding(horizontal = 16.dp, vertical = 8.dp),\n     text = phoneNumber.value,\n     shape = RoundedCornerShape(8.dp),\n     showError = showError.value,\n     errorText = \"Enter correct phone number\",\n     onValueChange = { phoneNumber.value = it },\n     phonePlaceholder = {\n        Text(text = \"xxx xxx xx xx\")\n      },\n     errorTextPaddings = PaddingValues(vertical = 2.dp, horizontal = 16.dp),\n     onFullNumberValue = { fullPhoneNumber.value = it },\n     phoneFieldColors = OutlinedTextFieldDefaults.colors(\n       focusedBorderColor = Color.Red,\n       unfocusedBorderColor = Color.Transparent,\n       focusedContainerColor = Color.White,\n       unfocusedContainerColor = Color.LightGray,\n       errorContainerColor = if (showError.value) Color(0xFFFFE5E5) else Color.Transparent\n     )\n  )\n\n```\n\n## Customize\n```python\n  modifier -\u003e Arrange your view\n  searchModifier -\u003e Arrange your search view\n  text -\u003e Set text\n  onValueChange -\u003e Use when text changes\n  onFullNumberValue -\u003e Get fullnumber value\n  shape -\u003e Arrange country field radius\n  showCountryCode -\u003e If you want the country code to appear\n  showError -\u003e If you want the error to appear\n  errorText -\u003e Set error text\n  showClearIcon -\u003e If you want clear icon to appear\n  focusField -\u003e If you want focus the field\n  initialCountryCode -\u003e Arrange initial country\n  errorTextPaddings -\u003e Set error label paddings\n  phonePlaceholder -\u003e When custom phone placeholder\n  searchPlaceholder -\u003e When custom search placeholder\n  onClicked -\u003e Get clicked\n  phoneFieldColors -\u003e Set your phone field colors\n  searchFieldColors -\u003e Set your search field colors\n  customRightIcon -\u003e Customize your right icon\n```\n\n## Download\n\u003e material3 is required.\n\u003cdetails\u003e\n  \u003csummary\u003eGroovy\u003c/summary\u003e\n\n  ## settings.gradle\n  ```gradle\n  maven { url 'https://jitpack.io' }\n  ```\n  ## build.gradle\n  ```gradle\n  implementation 'androidx.compose.material3:material3:1.1.0'\n  implementation 'com.github.tfaki:CountryCP:\u003clatest-version\u003e'\n  ```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eKotlin DSL\u003c/summary\u003e\n\n  ## settings.gradle\n  ```gradle\n  maven(url = \"https://jitpack.io\")\n  ```\n  ## build.gradle\n  ```gradle\n  implementation(\"androidx.compose.material3:material3:1.1.0\")\n  implementation(\"com.github.tfaki:CountryCP:\u003clatest-version\u003e\")\n  ```\n\u003c/details\u003e\n\n\u003cdiv align=\"start\"\u003e \u003ch2 align=\"start\"\u003eLicense\u003c/h1\u003e \u003c/div\u003e\n\n``` xml\n\nCopyright 2023 tfaki.\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfaki%2FCountryCP","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftfaki%2FCountryCP","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfaki%2FCountryCP/lists"}