{"id":25352657,"url":"https://github.com/mutkuensert/basicbottomsheet","last_synced_at":"2025-04-09T00:47:00.373Z","repository":{"id":224943307,"uuid":"764531349","full_name":"mutkuensert/BasicBottomSheet","owner":"mutkuensert","description":"An easy to use Android compose bottom sheet.","archived":false,"fork":false,"pushed_at":"2024-03-29T13:39:00.000Z","size":1542,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T18:56:40.124Z","etag":null,"topics":["android","android-bottomsheet","android-library","bottom-sheet","bottomsheet","compose","compose-library","jetpack-compose-library"],"latest_commit_sha":null,"homepage":"","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/mutkuensert.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}},"created_at":"2024-02-28T08:48:26.000Z","updated_at":"2024-08-04T17:55:28.000Z","dependencies_parsed_at":"2024-03-08T20:34:13.811Z","dependency_job_id":"6a368b1a-cbc6-4fce-bb48-e3e97c94fbf8","html_url":"https://github.com/mutkuensert/BasicBottomSheet","commit_stats":null,"previous_names":["mutkuensert/basicbottomsheet"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutkuensert%2FBasicBottomSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutkuensert%2FBasicBottomSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutkuensert%2FBasicBottomSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutkuensert%2FBasicBottomSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mutkuensert","download_url":"https://codeload.github.com/mutkuensert/BasicBottomSheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247953100,"owners_count":21023945,"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-bottomsheet","android-library","bottom-sheet","bottomsheet","compose","compose-library","jetpack-compose-library"],"created_at":"2025-02-14T18:57:11.451Z","updated_at":"2025-04-09T00:47:00.331Z","avatar_url":"https://github.com/mutkuensert.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BasicBottomSheet\n\n\u003cdiv align=\"left\"\u003e\n \u003cimg src=\"docs/BasicBottomSheet.gif\" width=\"230\"/\u003e\n\u003c/div\u003e\n\n## Adding the dependency\nAdd jitpack into the repositories\n\n```gradle\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\nAdd the dependency in build.gradle file.\n```gradle\nimplementation 'com.github.mutkuensert:BasicBottomSheet:1.0.1'\n```\n\n## Basic usage\nOnly a boolean is needed to control visibility.\nWherever BasicBottomSheet composable is placed, it will cover full screen when visible argument is true and completely disappear when false.\n\n```kotlin\n@Composable\nfun Screen() {\n  var isSheetVisible by remember { mutableStateOf(false) }\n\n  Button(onClick = { isSheetVisible = true }) {\n      Text(text = \"Open the bottom sheet\")\n  }\n\n  BasicBottomSheet(\n      visible = isSheetVisible,\n      onCloseSheet = { isSheetVisible = false }\n  ) {\n      Button(\n          onClick = {\n              //invoke some functions\n              isSheetVisible = false //Close the sheet\n          }) {\n          Text(text = \"Some action\")\n      }\n  }\n}\n```\n\n## Parameters\n```kotlin\n@Composable\nfun BasicBottomSheet(\n    onCloseSheet: () -\u003e Unit,\n    modifier: Modifier = Modifier,\n    visible: Boolean,\n    scrimColor: Color = Color.Black.copy(0.4f),\n    sheetColor: Color = MaterialTheme.colors.surface,\n    closeSheetThreshold: Dp = 150.dp,\n    shape: Shape = SheetShape,\n    enterTransition: EnterTransition = DefaultEnterTransition,\n    exitTransition: ExitTransition = DefaultExitTransition,\n    dragHandle: @Composable (() -\u003e Unit)? = { Handle() },\n    content: @Composable ColumnScope.() -\u003e Unit\n)\n```\n\n\n## Handle\nIf you don't want the handle, just set it to null.\n```kotlin\nBasicBottomSheet(\n    visible = isVisible,\n    dragHandle = null,\n    onCloseSheet = onCloseBottomSheet,\n){}\n```\n\nOr a custom handle can be used, the gesture detection will remain.\n```kotlin\nBasicBottomSheet(\n    visible = isVisible,\n    dragHandle = { Icon(imageVector = Icons.Default.ArrowDropDown, contentDescription = null) },\n    onCloseSheet = onCloseBottomSheet,\n){}\n```\n\n ## License\n```xml\nCopyright 2024 Mustafa Utku Ensert\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```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutkuensert%2Fbasicbottomsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmutkuensert%2Fbasicbottomsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutkuensert%2Fbasicbottomsheet/lists"}