{"id":13605130,"url":"https://github.com/AndroidPoet/Dropdown","last_synced_at":"2025-04-12T02:32:53.730Z","repository":{"id":39221840,"uuid":"485185020","full_name":"AndroidPoet/Dropdown","owner":"AndroidPoet","description":"💧A Powerful and customizable Compose Multiplatform dropdown menu with cascade and animations.","archived":false,"fork":false,"pushed_at":"2025-03-24T23:22:15.000Z","size":62156,"stargazers_count":397,"open_issues_count":11,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T00:24:30.468Z","etag":null,"topics":["android","androidpoet","dropdown","jetpack-compose","kotlin","material-design","material-ui","menubar"],"latest_commit_sha":null,"homepage":"https://androidpoet.github.io/Dropdown/","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/AndroidPoet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"AndroidPoet","custom":["https://www.buymeacoffee.com/AndroidPoet"]}},"created_at":"2022-04-25T01:28:25.000Z","updated_at":"2025-03-22T21:01:34.000Z","dependencies_parsed_at":"2024-08-04T09:25:40.513Z","dependency_job_id":"5cabb3a5-52b3-48a8-b509-f37832538bfa","html_url":"https://github.com/AndroidPoet/Dropdown","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidPoet%2FDropdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidPoet%2FDropdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidPoet%2FDropdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndroidPoet%2FDropdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndroidPoet","download_url":"https://codeload.github.com/AndroidPoet/Dropdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248506933,"owners_count":21115510,"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","androidpoet","dropdown","jetpack-compose","kotlin","material-design","material-ui","menubar"],"created_at":"2024-08-01T19:00:54.984Z","updated_at":"2025-04-12T02:32:53.724Z","avatar_url":"https://github.com/AndroidPoet.png","language":"Kotlin","funding_links":["https://github.com/sponsors/AndroidPoet","https://www.buymeacoffee.com/AndroidPoet"],"categories":["Libraries","Kotlin"],"sub_categories":["UI"],"readme":"\n\n\u003cdiv align=\"center\"\u003e\n\n# Dropdown\n💧 A powerful and customizable Compose Multiplatform dropdown menu with cascade and animations.\n\n[![Google Dev Library](https://user-images.githubusercontent.com/13647384/162663007-d911f6ce-ac1b-4754-a63b-eadbef38087f.svg)](https://devlibrary.withgoogle.com/authors/AndroidPoet)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![GitHub](https://user-images.githubusercontent.com/13647384/162662962-82e3c1eb-baf8-4e21-ad26-d4c4e3c31e44.svg)](https://github.com/AndroidPoet)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/13647384/166186269-091efb42-a143-4ccd-b9c4-0e0c4748c56e.gif\"/\u003e\n\n[Demo](https://androidpoet.github.io/LibPreviewWasm)\n\n\u003c/div\u003e\n\n## Who's using Dropdown?\n\n**👉 [Check out who's using Dropdown](/usecases.md)**\n\n## Features\n\n- 🎨 Rich customization options\n- 🌊 Extensive animation library\n- 📱 Compose Multiplatform support\n- 🎯 Intuitive DSL for menu creation\n- 🔄 Cascade menu support\n- 🎭 12+ enter/exit animations\n- 🎨 Custom theming support\n\n## Include in your project\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.androidpoet/dropdown.svg?label=Maven%20Central)](https://search.maven.org/artifact/io.github.androidpoet/dropdown)\n\n### Gradle\n\nAdd the dependency below to your **module**'s `build.gradle` file:\n\n```gradle\ndependencies {\n    implementation(\"io.github.androidpoet:dropdown:$version\")\n}\n```\n\n### Kotlin Multiplatform\n\nAdd the dependency below to your **module**'s `build.gradle.kts` file:\n\n```gradle\nsourceSets {\n    val commonMain by getting {\n        dependencies {\n            implementation(\"io.github.androidpoet:dropdown:$version\")\n        }\n    }\n}\n```\n\n## Usage\n\n### Create Menu Builder\n\n```kotlin\nfun getMenu(): MenuItem\u003cString\u003e {\n  val menu = dropDownMenu\u003cString\u003e {\n    item(\"about\", \"About\") {\n      icon(Icons.TwoTone.Language)\n    }\n    item(\"copy\", \"Copy\") {\n      icon(Icons.TwoTone.FileCopy)\n    }\n    item(\"share\", \"Share\") {\n      icon(Icons.TwoTone.Share)\n      item(\"to_clipboard\", \"To clipboard\") {\n        item(\"pdf\", \"PDF\")\n        item(\"epub\", \"EPUB\")\n        item(\"web_page\", \"Web page\")\n        item(\"microsoft_word\", \"Microsoft word\")\n      }\n      item(\"as_a_file\", \"As a file\") {\n        item(\"pdf\", \"PDF\")\n        item(\"epub\", \"EPUB\")\n        item(\"web_page\", \"Web page\")\n        item(\"microsoft_word\", \"Microsoft word\")\n      }\n    }\n    item(\"remove\", \"Remove\") {\n      icon(Icons.TwoTone.DeleteSweep)\n      item(\"yep\", \"Yep\") {\n        icon(Icons.TwoTone.Done)\n      }\n      item(\"go_back\", \"Go back\") {\n        icon(Icons.TwoTone.Close)\n      }\n    }\n  }\n  return menu\n}\n```\n\n### Create Dropdown Menu\n\n```kotlin\n@ExperimentalAnimationApi\n@Composable\nfun Menu(isOpen: Boolean = false, setIsOpen: (Boolean) -\u003e Unit, itemSelected: (String) -\u003e Unit) {\n  val menu = getMenu()\n  Dropdown(\n    isOpen = isOpen,\n    menu = menu,\n    colors = dropDownMenuColors(Teal200, White),\n    onItemSelected = itemSelected,\n    onDismiss = { setIsOpen(false) },\n    offset = DpOffset(8.dp, 0.dp),\n    enter = EnterAnimation.ElevationScale,\n    exit = ExitAnimation.ElevationScale,\n    easing = Easing.FastOutSlowInEasing,\n    enterDuration = 400,\n    exitDuration = 400\n  )\n}\n```\n\n## Supported Animations\n\n### Enter Animations\n\n```kotlin\nEnterAnimation.FadeIn\nEnterAnimation.SharedAxisXForward\nEnterAnimation.SharedAxisYForward\nEnterAnimation.SharedAxisZForward\nEnterAnimation.ElevationScale\nEnterAnimation.SlideIn\nEnterAnimation.SlideInHorizontally\nEnterAnimation.SlideInVertically\nEnterAnimation.ScaleIn\nEnterAnimation.ExpandIn\nEnterAnimation.ExpandHorizontally\nEnterAnimation.ExpandVertically\n```\n\n### Exit Animations\n\n```kotlin\nExitAnimation.FadeOut\nExitAnimation.SharedAxisXBackward\nExitAnimation.SharedAxisYBackward\nExitAnimation.SharedAxisZBackward\nExitAnimation.ElevationScale\nExitAnimation.SlideOut\nExitAnimation.SlideOutHorizontally\nExitAnimation.SlideOutVertically\nExitAnimation.ScaleOut\nExitAnimation.ShrinkOut\nExitAnimation.ShrinkHorizontally\nExitAnimation.ShrinkVertically\n```\n\n### Easing Options\n\n```kotlin\nEasing.FastOutSlowInEasing\nEasing.LinearOutSlowInEasing\nEasing.FastOutLinearInEasing\nEasing.LinearEasing\n```\n\n### Animation Examples\n\n| Fade | SharedAxisX | SharedAxisY | SharedAxisZ |\n|:---:|:---:|:---:|:---:|\n| \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165891972-ec0a4239-8998-4052-9338-1daa67fc0dce.gif\" width=\"150px\"/\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165891266-fd51e64d-d871-4438-acb7-4a2ec43d3efd.gif\" width=\"150px\"/\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165892730-2e2a4c81-6196-47d0-8e12-02668ccd9d9c.gif\" width=\"150px\"/\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165893392-65c7a7a9-d7b6-47bb-8141-5a49aa26958b.gif\" width=\"150px\"/\u003e |\n| ElevationScale | SlideIn(SlideOut) | SlideHorizontally | SlideVertically |\n| \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165893392-65c7a7a9-d7b6-47bb-8141-5a49aa26958b.gif\" width=\"150px\"/\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165894211-ff05c4c3-4e1d-47bb-8aac-b7272ccc2750.gif\" width=\"150px\"/\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165894765-2d0821bf-dabe-4f11-848f-f09180d4f0df.gif\" width=\"150px\"/\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165895557-231b55dc-1684-4b5f-b948-a640779f0eca.gif\" width=\"150px\"/\u003e |\n| Scale | Expand | Expand Horizontally | Expand Vertically |\n| \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165896166-7d62bb01-2701-4c24-a8b0-9244409f30ec.gif\" width=\"150px\"/\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165896619-d8aef09a-deea-4e75-926b-446caa3ad677.gif\" width=\"150px\"/\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165897083-cc5789aa-c086-40c4-903f-6188099fdae8.gif\" width=\"150px\"/\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/13647384/165897576-304d84ea-bb2d-4fea-a110-e4ac77eccac2.gif\" width=\"150px\"/\u003e |\n\n\u003csub\u003eList icons created by Freepik - Flaticon\u003c/sub\u003e\n\n## Support\n\n### Find this repository useful? :heart:\n\nSupport it by joining __[stargazers](https://github.com/AndroidPoet/Dropdown/stargazers)__ for this repository. :star:  \nAlso, __[follow me](https://github.com/AndroidPoet)__ on GitHub for more cool projects! 🤩\n\n\u003ca href=\"https://www.buymeacoffee.com/AndroidPoet\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e\n\n## License\n\n```xml\nCopyright 2022 AndroidPoet (Ranbir Singh)\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndroidPoet%2FDropdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAndroidPoet%2FDropdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndroidPoet%2FDropdown/lists"}