{"id":31811287,"url":"https://github.com/gregkorossy/lazy-sticky-headers","last_synced_at":"2025-10-30T15:41:13.258Z","repository":{"id":251971849,"uuid":"822827349","full_name":"gregkorossy/lazy-sticky-headers","owner":"gregkorossy","description":"Advanced Sticky Headers for Compose Multiplatform","archived":false,"fork":false,"pushed_at":"2024-11-13T15:58:08.000Z","size":10236,"stargazers_count":35,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T06:45:55.108Z","etag":null,"topics":["android","compose-android","compose-desktop","compose-ios","compose-library","compose-multiplatform","compose-wasm","compose-web","jetpack-compose","kotlin-multiplatform","lazylist"],"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/gregkorossy.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-01T23:05:10.000Z","updated_at":"2025-09-24T09:07:02.000Z","dependencies_parsed_at":"2024-08-06T23:00:18.130Z","dependency_job_id":"25a8f333-6265-446f-9ac3-470cc5df4c2d","html_url":"https://github.com/gregkorossy/lazy-sticky-headers","commit_stats":null,"previous_names":["gregkorossy/lazy-sticky-headers"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/gregkorossy/lazy-sticky-headers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregkorossy%2Flazy-sticky-headers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregkorossy%2Flazy-sticky-headers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregkorossy%2Flazy-sticky-headers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregkorossy%2Flazy-sticky-headers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregkorossy","download_url":"https://codeload.github.com/gregkorossy/lazy-sticky-headers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregkorossy%2Flazy-sticky-headers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281834099,"owners_count":26569835,"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","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-android","compose-desktop","compose-ios","compose-library","compose-multiplatform","compose-wasm","compose-web","jetpack-compose","kotlin-multiplatform","lazylist"],"created_at":"2025-10-11T06:43:13.208Z","updated_at":"2025-10-30T15:41:13.217Z","avatar_url":"https://github.com/gregkorossy.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Lazy Sticky Headers](asset/header.png)\n\n[![Kotlin 2.0.21](https://img.shields.io/badge/Kotlin-2.0.21-blue.svg?logo=kotlin)](http://kotlinlang.org)\n[![Compose Multiplatform 1.7.1](https://img.shields.io/badge/Compose_Multiplatform-1.7.1-blue.svg?logo=jetpackcompose)](https://github.com/JetBrains/compose-multiplatform)\n[![Maven Central](https://img.shields.io/maven-central/v/me.gingerninja.lazy/sticky-headers?color=orange)](https://search.maven.org/search?q=g:me.gingerninja.lazy)\n[![Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)\n\n![badge-android](http://img.shields.io/badge/platform-android-6EDB8D.svg?style=flat)\n![badge-ios](http://img.shields.io/badge/platform-ios-CDCDCD.svg?style=flat)\n![badge-desktop](http://img.shields.io/badge/platform-desktop-DB413D.svg?style=flat)\n![badge-js](http://img.shields.io/badge/platform-JS-F8DB5D.svg?style=flat)\n![badge-wasm](http://img.shields.io/badge/platform-Wasm-624FE8.svg?style=flat)\n\n# Advanced Sticky Headers\n\nCompose Multiplatform library for adding advanced sticky headers to lazy lists and grids.\n\n## Preview\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"asset/preview_contacts.gif\" width=\"270\"\u003e\n\u003cimg src=\"asset/preview_calendar.gif\" width=\"270\"\u003e\n\u003cimg src=\"asset/preview_grid.gif\" width=\"270\"\u003e\n\u003c/p\u003e\n\n## Getting started\n\n```kotlin\nimplementation(\"me.gingerninja.lazy:sticky-headers:0.1.0-alpha04\")\n```\n\n\u003cdetails\u003e\n\n\u003csummary\u003eSetup for multiplatform projects\u003c/summary\u003e\n\nIf you target a subset of the library supported platforms, add the library to your common source set:\n\n```kotlin\nkotlin {\n    sourceSets {\n        commonMain.dependencies {\n            implementation(\"me.gingerninja.lazy:sticky-headers:0.1.0-alpha04\")\n            // ...\n        }\n    }\n    // ...\n}\n```\n\nIf you have targets that are not supported by the library,\nadd the library separately to each supported target:\n\n```kotlin\nkotlin {\n    val desktopMain by getting {\n        dependencies {\n            implementation(\"me.gingerninja.lazy:sticky-headers:0.1.0-alpha04\")\n            // ...\n        }\n    }\n    androidMain.dependencies {\n        implementation(\"me.gingerninja.lazy:sticky-headers:0.1.0-alpha04\")\n        // ...\n    }\n    // other targets...\n}\n```\n\n\u003c/details\u003e\n\n## Usage\n\n```kotlin\nStickyHeaders(\n    state = listState, // from rememberLazyListState()\n    key = {\n        // sample keys: every 2 items will be grouped\n        it.index / 2\n    }\n) { key -\u003e\n    Text(\"Key: $key\")\n}\n```\n\n\nThe `StickyHeaders` is a container that holds the sticky items. This can be placed anywhere, such as in a `Box` overlaying the list items or in a `Row` / `Column` to align next to / over / under the list.\n\n\u003e ⚠️ It is _important_ to set the list state on both the `StickyHeaders` and the `LazyColumn` / `LazyRow`.\n\n\u003cdetails\u003e\n\n\u003csummary\u003eExample: usage with a LazyColumn in a Row\u003c/summary\u003e\n\n```kotlin\nval listState = rememberLazyListState()\n\nRow {\n    StickyHeaders(\n        state = listState,\n        key = {\n            it.index / 2\n        },\n    ) {\n        Text(\"Key: ${it.key}\")\n    }\n\n    LazyColumn(\n        modifier = Modifier.weight(1f),\n        state = listState,\n    ) {\n        items(count = 100) {\n            Card {\n                Text(\"Item $it\", modifier = Modifier.padding(20.dp))\n            }\n        }\n    }\n}\n```\n\n\u003c/details\u003e\n\nSee the [demo](demo) app for more elaborate samples.\n\n## Known issues\n\n- missing overscroll effect: [#1](https://github.com/gregkorossy/lazy-sticky-headers/issues/1)\n\n## License\n\n```text\nCopyright 2024 Gergely Kőrössy\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```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregkorossy%2Flazy-sticky-headers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregkorossy%2Flazy-sticky-headers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregkorossy%2Flazy-sticky-headers/lists"}