{"id":20878880,"url":"https://github.com/codeandtheory/ytag-android","last_synced_at":"2025-12-27T10:05:16.448Z","repository":{"id":155251614,"uuid":"616359148","full_name":"codeandtheory/YTag-android","owner":"codeandtheory","description":"Y Tag is a UI element in Android (some times referred to as chips) which displays a piece of information. It consist of a leading icon(optional), Text and a trailing icon (optional).","archived":false,"fork":false,"pushed_at":"2023-07-20T08:53:47.000Z","size":1077,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-19T09:42:14.543Z","etag":null,"topics":["android-ui","android-ui-widgets","compose","compose-ui","customui","customuicontrol","tag","taganimation","tagcontainer","tags"],"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/codeandtheory.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}},"created_at":"2023-03-20T08:29:46.000Z","updated_at":"2024-08-12T05:39:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"235d1d78-e36e-4977-9c3f-e1af9552baac","html_url":"https://github.com/codeandtheory/YTag-android","commit_stats":null,"previous_names":["codeandtheory/ytag-android"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandtheory%2FYTag-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandtheory%2FYTag-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandtheory%2FYTag-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeandtheory%2FYTag-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeandtheory","download_url":"https://codeload.github.com/codeandtheory/YTag-android/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243257797,"owners_count":20262294,"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-ui","android-ui-widgets","compose","compose-ui","customui","customuicontrol","tag","taganimation","tagcontainer","tags"],"created_at":"2024-11-18T07:14:30.678Z","updated_at":"2025-12-27T10:05:11.420Z","avatar_url":"https://github.com/codeandtheory.png","language":"Kotlin","readme":"# Y Tags\n\nY Tag is a UI element in Android (sometimes referred to as chips) which displays a piece of\ninformation.\nIt consists of a leading icon(optional), Text and a trailing icon (optional).\n\n## Features\n\n- Fully customizable\n  - Shape\n  - Leading and Trailing Icons\n  - Border\n  - Background\n  - Text style\n  - Shadow\n- Provides a container called Tag view container which holds multiple tags\n  - Container size can be fixed or variable\n  - If the container does not have enough space to accommodate the given tags, it will show an overflow\n    tag which is configurable.\n- Built with Compose UI\n\n## Usage\n\n\n**Basic**\n\n```\nTagView(text =\"Default\")\n```\n\n**Customizations**\n\n```\nval text = \"Y Tag\"\nval tagViewModifiers = TagViewModifiers.Builder()\n    .width(140.dp)\n    .shape(CircleShape)\n    .backgroundColor(backgroundColor)\n    .enableBorder(true)\n    .borderColor(Color.Red)\n    .textColor(Color.Black)\n    .maxLines(1)\n    .overFlow(TextOverflow.Ellipsis)\n    .build()\nval leadingIcon =  { tagViewData -\u003e\n    IconButton(\n       onClick = {}) {\n       Icon(painter = painterResource(id = R.drawable.ic_location_24px),\n            contentDescription = null,\n            tint = iconTint\n        )\n      }\n    }   \n    \nval trailingIcon =  { tagViewData -\u003e\n    IconButton(\n       onClick = {}) {\n       Icon(painter = painterResource(id = R.drawable.ic_close_20px),\n            contentDescription = null,\n            tint = iconTint\n        )\n      }\n    }     \n    \nTagView(text = text,  tagViewModifiers = tagViewModifiers, leadingIcon = leadingIcon, trailingIcon = trailingIcon,  enabled = true)\n```\n\n**Y Tag Container**\n\n```\n val tagViewData = remember {\n        mutableStateListOf\u003cTagViewData\u003e()\n    }\n    \n   tagViewData.addAll(   \n   TagViewData(\n        text = \"capsule\",\n        tagViewModifiers = TagViewModifiers.Builder()\n        .width(90.dp)\n        .shape(CircleShape)\n        .backgroundColor(backgroundColor).textColor(textColor).style(textStyle).build()\n    ))\n    \n  val tagViewContainerModifiers = TagViewContainerModifiers.Builder()\n      .shape(RoundedCornerShape(4.dp)\n      .tagSpacingVertical(8.dp)\n      .tagSpacingHorizontal(8.dp)\n      .width(360.dp)\n      .height(50.dp)\n      .moreTagConfiguration(\n       TagViewData(\n           overFlowText = { count -\u003e\n              \"+ $count more\"\n           },\n           tagViewModifiers = TagViewModifiers.Builder()\n              .backgroundColor(colorResource(id = R.color.light_blue_300))\n               .shape(CircleShape).width(80.dp).textAlign(TextAlign.Start).height(30.dp)\n               .maxLines(1).overFlow(TextOverflow.Ellipsis).textAlign(TextAlign.Center)\n               .textColor(Color.Black).fontWeight(FontWeight.Medium).onCLick { }.build()\n              )\n     ).onCLick {}\n     .build()\n     \n    TagViewContainer(tagViewData = tagViewData, tagViewContainerModifiers = tagViewContainerModifiers)  \n```\n\n## Screenshots\n\n\u003cimg src=\"screenshots/Stepper_Screenshot_1.jpg\"/\u003e\n\n## Demo\n\n\u003cimg src=\"screenshots/y_tag_13_s.gif\"/\u003e\n\n### How to generate test report\n\n- Generating Jacoco test report\n  - Gradle command `clean build createMergedJacocoReport`\n    - From Android studio\n      - Open the Gradle menu bar from Android Studio right-side panel\n      - Click on the Gradle icon and\n      - In the command popup window type `clean build createMergedJacocoReport` and press enter\n      - Wait for the execution completion,\n      - After successful execution each module-level execution report will be stored in '\n        module\\build\\reports\\jacoco\\html\\index.html'.\n\n### How to generate dokka report\n\n- Gradle command single module `clean build dokkaHtml` for multi\n  module `clean build dokkaHtmlMultiModule`\n  - From Android Studio:\n  - Open the Gradle menu bar from Android Studio right side panel\n  - Click on the Gradle icon and\n  - In the command popup window type `dokkaHtml` for multi-module `dokkaHtmlMultiModule`\n\n### How to check KTLint\n\n- Gradle command for checking lint error: `ktlintCheck`\n- Gradle command for formatting code: `ktlintFormat`\n  \n  =======\n\n## License\n\n```\n    Copyright 2023 YTags\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeandtheory%2Fytag-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeandtheory%2Fytag-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeandtheory%2Fytag-android/lists"}