{"id":14460155,"url":"https://github.com/stefanoq21/BottomSheetNavigator3","last_synced_at":"2025-08-28T18:32:01.205Z","repository":{"id":246915384,"uuid":"824657155","full_name":"stefanoq21/BottomSheetNavigator3","owner":"stefanoq21","description":"This library provides a navigation solution for Compose projects using Material3 BottomSheets","archived":false,"fork":false,"pushed_at":"2024-12-12T17:42:12.000Z","size":190,"stargazers_count":29,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-12T18:28:52.299Z","etag":null,"topics":["android","bottomsheet","jetpack-compose","kotlin","navigation"],"latest_commit_sha":null,"homepage":"https://medium.com/@stefanoq21/13f726c13d6b","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/stefanoq21.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2024-07-05T16:02:30.000Z","updated_at":"2024-12-12T17:41:23.000Z","dependencies_parsed_at":"2024-09-17T21:13:00.374Z","dependency_job_id":"e3b72692-c174-40c2-b436-f9080e00ed03","html_url":"https://github.com/stefanoq21/BottomSheetNavigator3","commit_stats":null,"previous_names":["stefanoq21/bottomsheetnavigator3"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoq21%2FBottomSheetNavigator3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoq21%2FBottomSheetNavigator3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoq21%2FBottomSheetNavigator3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanoq21%2FBottomSheetNavigator3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanoq21","download_url":"https://codeload.github.com/stefanoq21/BottomSheetNavigator3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231294144,"owners_count":18354140,"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","bottomsheet","jetpack-compose","kotlin","navigation"],"created_at":"2024-09-01T21:01:06.881Z","updated_at":"2024-12-25T23:30:28.389Z","avatar_url":"https://github.com/stefanoq21.png","language":"Kotlin","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"readme":"# Material3 BottomSheet Navigation\n\nThis library provides a navigation solution for Compose projects using Material3 BottomSheets. It allows you to define your BottomSheet as navigation routes, eliminating the need for the `androidx.compose.material.navigation` and ` androidx.compose.material:material` !\nlibraries. This simplifies your app's dependencies and ensures a consistent Material3 experience.\nThis library also leverages the new functionality from `androidx.navigation:navigation-compose:2.8.0-beta0X` to allow you to define routes with serialized classes.\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.stefanoq21/material3-navigation)](https://central.sonatype.com/artifact/io.github.stefanoq21/material3-navigation)\n\n![Static Badge](https://img.shields.io/badge/minSdk-21-blue?link=https%3A%2F%2Fgithub.com%2Fstefanoq21%2FBottomSheetNavigator3%2Fblob%2Fmain%2Fmaterial3-navigation%2Fbuild.gradle.kts%23L15)\n\n## Implementation\n\nYou can follow the implementation approach used in the  [app](https://github.com/stefanoq21/BottomSheetNavigator3/tree/main/app \"app\") module. Alternatively, you can find a detailed explanation below.\n\n### Dependencies\nThe library is now available on MavenCentral!!! \nAdd the dependencies to your `libs.versions.toml`\n```\n[versions]\n...\nmaterial3Navigation = \"X.X.X\" current release version\n\n[libraries]\n...\nmaterial3-navigation = { group = \"io.github.stefanoq21\", name = \"material3-navigation\", version.ref = \"material3Navigation\" }\n\n```\nIn your `build.gradle.kts` implement your dependencies:\n```\n...\ndependencies {\n...\n implementation(libs.material3.navigation)\n```\n### Usage\nDefine your **BottomSheetNavigator**\n```\n...\n   val bottomSheetNavigator =\n                    rememberBottomSheetNavigator(skipPartiallyExpanded = true/false)\n                val navController = rememberNavController(bottomSheetNavigator)\n```\nAdd the **ModalBottomSheetLayout** on top of the **NavHost** component and pass the **bottomSheetNavigator** as parameter:\n```\nModalBottomSheetLayout(\n                        modifier = Modifier\n                            .fillMaxSize(),\n                        bottomSheetNavigator = bottomSheetNavigator\n                    ) {\n                        NavHost(\n                            navController = navController,\n                            startDestination = Screen.Home\n                        ) {\n...\n```\nDefine your routes as strings or data class (depend on the compose navigation version you are using):\n```\n...\n   bottomSheet\u003cScreen.BottomSheetFullScreen\u003e {\n                                BSFullScreenLayout()\n                            }\n  bottomSheet(\"BottomSheetFullScreen\") {\n                                BSFullScreenLayout()\n                            }\n...\n```\nEverything is ready! Just navigate to your new destination as usual:\n```\n...\nButton(onClick = { navController.navigate(Screen.BottomSheetFullScreen) }) {\n                                        Text(text = \"BottomSheetFullScreen\")\n                                    }\n...\n```\n\n### Navigating Back from a Bottom Sheet\n\nTo implement a back or close button in your bottom sheet, I suggest to use `onBackPressedDispatcher.onBackPressed()`. This because if you use  `navController.popBackStack()` the animation will not appear. The animation was disabled, in this case, to avoid problems during the navigation that start from bottomshets.\n\n### Customization\n\nThe library currently supports the same customization options of the standard `androidx.compose.material3.ModalBottomSheet`. You can customize the appearance of the all the bottomsheets used in your navigation graph by passing the parameters to the `ModalBottomSheetLayout`.\n\n## Preview\n![](https://github.com/stefanoq21/BottomSheetNavigator3/assets/22545898/c971f6cf-bb04-41c1-b3ea-7b72757e09af)\n\n\n## Contributing\n\nWe welcome contributions to this library! If you have bug reports, feature requests, or code improvements, please feel free to create a pull request. I appreciate your help in making this library even better.\n\n## License\n\n   Copyright 2024 stefanoq21\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%2Fstefanoq21%2FBottomSheetNavigator3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanoq21%2FBottomSheetNavigator3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanoq21%2FBottomSheetNavigator3/lists"}