{"id":32361906,"url":"https://github.com/lucf15/modalbottomsheet","last_synced_at":"2026-05-17T15:09:27.670Z","repository":{"id":319483747,"uuid":"1078810748","full_name":"lucf15/ModalBottomSheet","owner":"lucf15","description":"A custom implementation of Material 3's ModalBottomSheet that fixes nested scrolling and IME padding issues.","archived":false,"fork":false,"pushed_at":"2025-10-18T15:08:51.000Z","size":122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-19T08:21:05.639Z","etag":null,"topics":["android","compose","kotlin","material3-android","modalbottomsheet"],"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/lucf15.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-18T13:26:44.000Z","updated_at":"2025-10-18T15:08:55.000Z","dependencies_parsed_at":"2025-10-19T08:23:11.541Z","dependency_job_id":"59452e3e-2884-4835-ab07-db99f175d6aa","html_url":"https://github.com/lucf15/ModalBottomSheet","commit_stats":null,"previous_names":["lucf15/modalbottomsheet"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lucf15/ModalBottomSheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucf15%2FModalBottomSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucf15%2FModalBottomSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucf15%2FModalBottomSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucf15%2FModalBottomSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucf15","download_url":"https://codeload.github.com/lucf15/ModalBottomSheet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucf15%2FModalBottomSheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33143276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","compose","kotlin","material3-android","modalbottomsheet"],"created_at":"2025-10-24T15:02:51.237Z","updated_at":"2026-05-17T15:09:27.658Z","avatar_url":"https://github.com/lucf15.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ModalBottomSheet (Compose Android only)\n\n[![Release](https://img.shields.io/github/tag/lucf15/ModalBottomSheet.svg)](https://github.com/lucf15/ModalBottomSheet/tags)\n\n\nA custom implementation of Material 3's `ModalBottomSheet` that fixes critical issues with nested\nscrolling and IME (keyboard) padding:\n\n1. **[Issue #353304855](https://issuetracker.google.com/issues/353304855)**: Fixed inconsistent\n   nested scroll handling\n    - The official implementation incorrectly handles nested scroll events when the bottom sheet\n      contains scrollable components like `LazyColumn`\n    - The sheet attempts to dismiss prematurely, even when the inner content hasn't been fully\n      scrolled to the top\n\n2. **[Issue #289824811](https://issuetracker.google.com/issues/289824811)**: Customizable IME\n   padding behavior\n    - The official implementation applies `imePadding()` to the entire sheet, causing unwanted\n      bottom padding when the keyboard appears\n\n## Installation\n\n### Step 1: Add JitPack repository\n\nAdd the JitPack repository to your `settings.gradle.kts` (or root `build.gradle.kts` if using older Gradle):\n\n```kotlin\ndependencyResolutionManagement {\n    repositories {\n        google()\n        mavenCentral()\n        maven { url = uri(\"https://jitpack.io\") }\n    }\n}\n```\n\n### Step 2: Add the dependency\n\n#### Gradle (Kotlin DSL)\n\nAdd the dependency to your module's `build.gradle.kts`:\n\n```kotlin\ndependencies {\n    implementation(\"com.github.lucf15:ModalBottomSheet:1.0.1\")\n}\n```\n\n## Requirements\n\n- **Minimum SDK**: 21\n- **Compile SDK**: 35\n\n## API Reference\n\n### ModalBottomSheet\n\n```kotlin\n@Composable\nfun ModalBottomSheet(\n    onDismissRequest: () -\u003e Unit,\n    modifier: Modifier = Modifier,\n    sheetState: SheetState = rememberModalBottomSheetState(),\n    sheetMaxWidth: Dp = BottomSheetDefaults.SheetMaxWidth,\n    sheetGesturesEnabled: Boolean = true,\n    nestedScrollableState: ScrollableState? = null,\n    shape: Shape = androidx.compose.material3.BottomSheetDefaults.ExpandedShape,\n    containerColor: Color = androidx.compose.material3.BottomSheetDefaults.ContainerColor,\n    contentColor: Color = contentColorFor(containerColor),\n    tonalElevation: Dp = 0.dp,\n    scrimColor: Color = androidx.compose.material3.BottomSheetDefaults.ScrimColor,\n    dragHandle: @Composable (() -\u003e Unit)? = { androidx.compose.material3.BottomSheetDefaults.DragHandle() },\n    contentWindowInsets: @Composable () -\u003e WindowInsets = { BottomSheetDefaults.windowInsets },\n    properties: ModalBottomSheetProperties = ModalBottomSheetDefaults.properties,\n    showMotion: FiniteAnimationSpec\u003cFloat\u003e = BottomSheetAnimationSpec,\n    hideMotion: FiniteAnimationSpec\u003cFloat\u003e = BottomSheetAnimationSpec,\n    anchoredDraggableMotionSpec: FiniteAnimationSpec\u003cFloat\u003e = BottomSheetAnimationSpec,\n    content: @Composable ColumnScope.() -\u003e Unit,\n)\n```\n\n## Migration from Official ModalBottomSheet\n\nMigrating from the official Material 3 `ModalBottomSheet` is straightforward:\n\n1. Update your import:\n\n```kotlin\n// Before\nimport androidx.compose.material3.ModalBottomSheet\nimport androidx.compose.material3.rememberModalBottomSheetState\n\n// After\nimport it.lucf15.compose.bottomsheet.ModalBottomSheet\nimport it.lucf15.compose.bottomsheet.rememberModalBottomSheetState\n```\n\n2. If you have scrollable content, pass the scroll state:\n\n```kotlin\nval scrollState = rememberLazyListState()\n\nModalBottomSheet(\n    // ... other parameters\n    nestedScrollableState = scrollState // Add this\n) {\n    LazyColumn(state = scrollState) {\n        // Your content\n    }\n}\n```\n\n3. If you want to control IME padding:\n\n```kotlin\nModalBottomSheet(\n    // ... other parameters\n) {\n    Box(Modifier.imePadding()) { // Add imePadding when you need it\n        // Your content\n    }\n}\n```\n\n## How It Works\n\n### Nested Scroll Fix\n\nThe library implements a custom `ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection` that\nproperly coordinates scroll events between the bottom sheet and nested scrollable content. It\nensures:\n\n- The inner scrollable component receives scroll events first\n- The bottom sheet only responds to dismiss gestures when the inner content is at the top\n- Smooth fling gestures are preserved across both components\n\n### Ime\n\nInstead of applying `Modifier.imePadding()` unconditionally on the root ModalBottomSheet, the\nlibrary lets users place it where needed.\n\n## License\n\n```\nCopyright 2025 lucf15\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%2Flucf15%2Fmodalbottomsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucf15%2Fmodalbottomsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucf15%2Fmodalbottomsheet/lists"}