{"id":13609377,"url":"https://github.com/dokar3/sheets","last_synced_at":"2026-03-15T20:14:55.882Z","repository":{"id":37822951,"uuid":"496867717","full_name":"dokar3/sheets","owner":"dokar3","description":"Another feature-rich bottom sheet for Compose Multiplatform.","archived":false,"fork":false,"pushed_at":"2024-10-17T12:30:22.000Z","size":739,"stargazers_count":254,"open_issues_count":13,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-16T18:06:51.268Z","etag":null,"topics":["android","android-library","android-ui","bottomsheet","compose-multiplatform","jetpack-compose","kotlin","kotlin-multiplatform"],"latest_commit_sha":null,"homepage":"https://dokar3.github.io/sheets/","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/dokar3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2022-05-27T05:06:39.000Z","updated_at":"2025-05-14T12:17:15.000Z","dependencies_parsed_at":"2024-02-09T06:32:37.190Z","dependency_job_id":"69490c04-8920-4185-b432-09cf91926be1","html_url":"https://github.com/dokar3/sheets","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokar3%2Fsheets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokar3%2Fsheets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokar3%2Fsheets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dokar3%2Fsheets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dokar3","download_url":"https://codeload.github.com/dokar3/sheets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582905,"owners_count":22095518,"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-library","android-ui","bottomsheet","compose-multiplatform","jetpack-compose","kotlin","kotlin-multiplatform"],"created_at":"2024-08-01T19:01:34.470Z","updated_at":"2026-03-15T20:14:50.846Z","avatar_url":"https://github.com/dokar3.png","language":"Kotlin","readme":"# Sheets\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.dokar3/sheets/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.dokar3/sheets)\n\n[Online Demo](https://dokar3.github.io/sheets/)\n\nAnother feature-rich bottom sheet for Compose Multiplatform. The following targets are supported.\n\n- Android\n- Desktop\n- Web (wasmJs)\n\nSeeking contributions for the iOS target since I'm a Windows-only user. If you want to help please feel free to make a pull request.\n\n\u003ca href=\"images/screenshot_simple.png\"\u003e\u003cimg src=\"images/screenshot_simple.png\" width=\"32%\"/\u003e\u003c/a\u003e\n\u003ca href=\"images/screenshot_list.png\"\u003e\u003cimg src=\"images/screenshot_list.png\" width=\"32%\"/\u003e\u003c/a\u003e\n\u003ca href=\"images/screenshot_intent-picker.png\"\u003e\u003cimg src=\"images/screenshot_intent-picker.png\" width=\"32%\"/\u003e\u003c/a\u003e\n\nWhy this is needed when we already have `ModalBottomSheetLayout` and `ModalBottomSheet`? See the [Comparisons](#Comparisons) table. \n\n# Features\n\n\n### Peek support\n\n  ```kotlin\n  BottomSheet(\n      state = state,\n      // PeekHeight.px(Int) and PeekHeight.fraction(Float) are supported as well.\n      peekHeight = PeekHeight.dp(300),\n      // Set to true to the peeked state, default to false.\n      skipPeeked = false,\n  ) { ...}\n  ```\n\n\n### Customizable animations\n\n  ```kotlin\n  // Animation off\n  state.expand(animated = false)\n\n  // Default\n  state.expand(animationSpec = spring())\n\n  // Slow animation\n  state.expand(animationSpec = tween(durationMillis = 2000))\n  ```\n\n\n### Interceptable state\n\n```kotlin\nval state = rememberBottomSheetState(\n    confirmValueChange = {\n        if (it == BottomSheetValue.Collapsed) {\n            // Intercept logic\n        } else {\n            true\n        }\n    },\n)\n```\n\n### Whole sheet above the keyboard\n\nMay be useful when the bottom sheet contains some text fields.\n\n\u003e *Please note after setting this, your sheet content be squashed if the bottom sheet is too long, so make your content scrollable by default.*\n\n```kotlin\nBottomSheet(\n    state = state,\n    showAboveKeyboard = true,\n) {\n    TextFieldSheetContent(\n        modifier = Modifier.verticalScroll(rememberScrollState()),\n    )\n}\n```\n\n### Material 2 and Material 3\n\nMigration is simple, just change the imports.\n\n```kotlin\n// Material 2:\nimport com.dokar.sheets.BottomSheet\n\n// Material 3:\nimport com.dokar.sheets.m3.BottomSheet\n```\n\n### Window Controlling\n\nSystem bar colors and some dialog window properties can be customized by the `behaviors` parameter.\n\n```kotlin\nBottomSheet(\n    ...\n    behaviors = BottomSheetDefaults.dialogSheetBehaviors(\n        dialogSecurePolicy = SecureFlagPolicy.Inherit,\n        dialogWindowSoftInputMode = WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED,\n        lightStatusBar = false,\n        lightNavigationBar = false,\n        statusBarColor = Color.Transparent,\n        navigationBarColor: Color = Color.Black,\n    ),\n) { ... }\n```\n\n### Embedded sheet\n\nTo embed the sheet in the current layout hierarchy, use the `BottomSheetLayout()`:\n\n```kotlin\nBox {\n    MainContent()\n\n    val state = rememberBottomSheetState()\n    if (state.visible) {\n        BottomSheetLayout(state = state) {\n            ...\n        }\n    }\n}\n```\n\n### Listenable drag progress\n\nIt's useful when syncing some transitions with the drag gesture.\n\n```kotlin\nfun Modifier.iosBottomSheetTransitions(\n    state: BottomSheetState,\n    statusBarInsets: WindowInsets,\n): Modifier = graphicsLayer {\n    val progress = (state.dragProgress - 0.5f) / 0.5f\n    if (progress \u003c= 0f) {\n        return@graphicsLayer\n    }\n\n    val scale = 1f - 0.1f * progress\n    scaleX = scale\n    scaleY = scale\n\n    val statusBarHeight = statusBarInsets.getTop(this)\n    val scaledTopSpacing = size.height * 0.1f / 2f\n    translationY = progress * (statusBarHeight +\n            16.dp.toPx() - scaledTopSpacing)\n\n    clip = true\n    shape = RoundedCornerShape(progress * 16.dp)\n}\n```\n\n# Usage\n\n### Material 2\n\n```kotlin\nimplementation(\"io.github.dokar3:sheets:latest_version\")\n```\n\n### Material 3\n\n```kotlin\nimplementation(\"io.github.dokar3:sheets-m3:latest_version\")\n```\n\n# Comparisons\n\n|   Feature\\Component    | sheets | ModalBottomSheet | ModalBottomSheetLayout |\n|:----------------------:|:------:|:----------------:|:----------------------:|\n|       Material 2       |   ✅    |        ❌         |           ✅            |\n|       Material 3       |   ✅    |        ✅         |           ❌            |\n|        Embedded        |   ✅    |        ❌         |           ✅            |\n|   In modal (Dialog)    |   ✅    |        ✅         |           ❌            |\n|   Dialog properties    |   ✅    |        ❌         |           /            |\n|      Drag handle       |   ✅    |        ✅         |           ❌            |\n| Half expanded (Peeked) |   ✅    |        ✅         |           ✅            |\n|      Peek height       |   ✅    |        ❌         |           ❌            |\n| Custom animation spec  |   ✅    |        ❌         |           ✅            |\n|     Drag progress      |   ✅    |        ❌         |           ✅            |\n|   confirmValueChange   |   ✅    |        ✅         |           ✅            |\n|   Dim color (scrim)    |   ✅    |        ✅         |           ✅            |\n\n*Compose Material is still evolving, so this table may no longer be accurate after some versions.*\n\n# Contribution\n\nNeed some features? Found a bug?\n\nOpen an issue, or just create a pull request if you want! This project is open for contributions.\n\n# License\n\n```\nCopyright 2022 dokar3\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","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdokar3%2Fsheets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdokar3%2Fsheets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdokar3%2Fsheets/lists"}