{"id":26535021,"url":"https://github.com/mikayelgr/cobadge","last_synced_at":"2025-03-21T20:30:25.644Z","repository":{"id":144532659,"uuid":"395510685","full_name":"mikayelgr/cobadge","owner":"mikayelgr","description":"Unopinionated, easy-to-use, and customizable Badge component for Jetpack Compose","archived":false,"fork":false,"pushed_at":"2021-12-19T11:09:54.000Z","size":166,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T23:35:00.301Z","etag":null,"topics":["android","android-library","badge","component","jetpack-compose","kotlin","kotlin-android","kotlin-library","library","ui"],"latest_commit_sha":null,"homepage":"https://jitpack.io/#michaelgrigoryan25/cobadge","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikayelgr.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":"2021-08-13T03:33:27.000Z","updated_at":"2022-06-28T06:41:55.000Z","dependencies_parsed_at":"2023-06-18T10:18:11.441Z","dependency_job_id":null,"html_url":"https://github.com/mikayelgr/cobadge","commit_stats":null,"previous_names":["mikayelgr/cobadge"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikayelgr%2Fcobadge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikayelgr%2Fcobadge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikayelgr%2Fcobadge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikayelgr%2Fcobadge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikayelgr","download_url":"https://codeload.github.com/mikayelgr/cobadge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244864960,"owners_count":20523264,"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","badge","component","jetpack-compose","kotlin","kotlin-android","kotlin-library","library","ui"],"created_at":"2025-03-21T20:30:25.034Z","updated_at":"2025-03-21T20:30:25.622Z","avatar_url":"https://github.com/mikayelgr.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align = \"center\"\u003e\r\n    Cobadge\r\n\u003c/h1\u003e\r\n\r\n\u003cp align = \"center\"\u003e\r\n    \u003ca target=\"__blank\" rel=\"noopener noreferrer\"  href=\"https://jitpack.io/#michaelgrigoryan25/cobadge\"\u003e\u003cimg src=\"https://jitpack.io/v/michaelgrigoryan25/cobadge.svg\" alt=\"JitPack\"/\u003e\u003c/a\u003e\r\n    \u003ca href=\"#\"\u003e\u003cimg alt=\"Android Language Badge\" src=\"https://badgen.net/badge/OS/Android?icon=https://raw.githubusercontent.com/androiddevnotes/awesome-jetpack-compose-android-apps/master/assets/android.svg\u0026color=3ddc84\"/\u003e\u003c/a\u003e\r\n    \u003ca href=\"#\"\u003e\u003cimg alt=\"Kotlin Language Badge\" src=\"https://badgen.net/badge/language/Kotlin?icon=https://raw.githubusercontent.com/androiddevnotes/awesome-jetpack-compose-android-apps/master/assets/kotlin.svg\u0026color=f18e33\"/\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\u003cp align = \"center\"\u003e\r\n    \u003ca href=\"#\"\u003e\u003cimg height=\"70px\" src=\"docs/screenshots/badges.png\" alt=\"Badges\" /\u003e\u003c/a\u003e\r\n\u003c/p\u003e\r\n\r\n\u003cp style = \"margin-bottom: 5%\" align = \"center\"\u003e🗻 Unopinionated, easy-to-use, and customizable Badge component for Jetpack Compose\u003c/p\u003e\r\n\r\n# Getting started\r\n\r\nIn this section I will walk you through the steps to add Cobadge to your Android app.\r\n\r\n### Add the JitPack repository to your build file\r\n\r\nAdd this line at the end of `repositories`:\r\n\r\n```groovy\r\nmaven { url 'https://jitpack.io' }\r\n```\r\n\r\nIf your project is set to fail on project repositories, then add that line to `settings.gradle` file in `repositories` field, so that it looks approximately like this\r\n\r\n```groovy\r\ndependencyResolutionManagement {\r\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\r\n    repositories {\r\n        google()\r\n        mavenCentral()\r\n        maven { url 'https://jitpack.io' }\r\n    }\r\n}\r\nrootProject.name = \"Your application\"\r\n```\r\n\r\n### Add the dependency and replace `Tag` with the latest version.\r\n\r\nLatest version is indicated below:\r\n\r\n[![](https://jitpack.io/v/michaelgrigoryan25/cobadge.svg)](https://jitpack.io/#michaelgrigoryan25/cobadge)\r\n\r\nGroovy\r\n\r\n```groovy\r\nimplementation 'com.github.michaelgrigoryan25:cobadge:Tag'\r\n```\r\n\r\nKotlin DSL\r\n\r\n```kotlin\r\nimplementation(\"com.github.michaelgrigoryan25:cobadge:Tag\")\r\n```\r\n\r\n# Usage\r\n\r\nUsing Cobadge is really easy! Here's an example:\r\n\r\n```kotlin\r\nBadge(\r\n    color = Color200,\r\n    text = \"Hello World\"\r\n)\r\n```\r\n\r\nHere are all the options that Cobadge takes. Fortunately, most of them are optional.\r\n\r\n```kotlin\r\n// Badge text\r\ntext: String,\r\n// Badge background color\r\ncolor: Color,\r\n// Badge size (calculated automatically)\r\nsize: Size = Size.MD,\r\n// Outer badge padding\r\npaddingSelf: Dp = 4.dp,\r\n// Supports clicking\r\nisClickable: Boolean = true,\r\n// Badge rounding (calculated automatically)\r\nrounded: Rounding = Rounding.XL,\r\n// Badge background color transparency\r\nbackgroundColorOpacity: Float = 1f,\r\n// Badge text color\r\ntextColor: Color = Color.Unspecified,\r\n// Action that is going to get triggered on click\r\nonClickAction: () -\u003e Unit = {},\r\n// Badge text font weight\r\nfontWeight: FontWeight = FontWeight.Bold\r\n```\r\n\r\n# Contributions\r\n\r\nContributions to Cobadge are welcome! Saw a bug? [Create a pull request!](https://github.com/michaelgrigoryan25/cobadge/issues/new) Have a suggestion? [Create an issue](https://github.com/michaelgrigoryan25/cobadge/issues/new) or [start a discussion!](https://github.com/michaelgrigoryan25/cobadge/discussions/new)\r\n\r\n_Author: Michael Grigoryan_\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikayelgr%2Fcobadge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikayelgr%2Fcobadge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikayelgr%2Fcobadge/lists"}