ContactListView
1.0.1indexedA-Z grouped contact list with sticky section headers, right-side alphabet index bar and draggable floating cursor; highly customizable builders and optional leading/trailing list slots.
A-Z grouped contact list with sticky section headers, right-side alphabet index bar and draggable floating cursor; highly customizable builders and optional leading/trailing list slots.
A Compose Multiplatform library that ports the contact_list_view Flutter package. It provides an A-Z grouped contact list with sticky section headers, a right-side alphabet index bar, and a floating cursor while dragging.
Repository: github.com/Matkurban/ContactListView
| Platform | Target |
|---|---|
| Android | minSdk 24 |
| iOS | Arm64, Simulator Arm64 |
gradle/libs.versions.toml)Add to your gradle/libs.versions.toml:
[versions]
contactlistview = "1.0.0"
[libraries]
contactlistview = { module = "io.github.matkurban:contactlistview", version.ref = "contactlistview" }
Then in build.gradle.kts:
kotlin {
sourceSets {
commonMain.dependencies {
implementation(libs.contactlistview)
}
}
}
Alternatively, add the dependency directly to your commonMain source set:
// build.gradle.kts
kotlin {
sourceSets {
commonMain.dependencies {
implementation("io.github.matkurban:contactlistview:1.0.0")
}
}
}
Import from io.github.matkurban.contactlistview.*.
import androidx.compose.material3.ListItem
import androidx.compose.material3.Text
import io.github.matkurban.contactlistview.ContactListView
data ( name: String)
ContactListView(
contactsList = contacts,
tag = { contact ->
first = contact.name.firstOrNull()?.uppercaseChar() ?:
(first ..) first.toString()
},
sticky = ,
startContent = {
item { ListItem(headlineContent = { Text() }) }
},
endContent = {
item { ListItem(headlineContent = { Text() }) }
},
itemBuilder = { contact ->
ListItem(headlineContent = { Text(contact.name) })
},
)
This repository includes demo apps for each platform:
Run the samples:
./gradlew :androidApp:assembleDebug
./gradlew :desktopApp:run
./gradlew :webApp:wasmJsBrowserDevelopmentRun
./gradlew :contactlistview:jvmTest
contactlistview — published library (100% commonMain)sample — demo UI (not published)androidApp / desktopApp / webApp — sample appsThis project is licensed under the MIT License.
# sorted laststickyHeaderBuilder, cursorBuilder, index bar style buildersstartContent / endContent — leading and trailing lazy list slots| Desktop |
| JVM |
| Web | JS, Wasm |
| API | Description |
|---|
stickyHeaderBuilder | Custom section header; receives tag and isPinned |
cursorBuilder | Custom floating cursor while dragging the index bar |
indexBarBoxDecorationBuilder | Style index bar item background per selection state |
indexBarTextStyleBuilder | Style index bar item text per selection state |
stickyHeaderBoxDecorationBuilder | Style sticky header background per pinned state |
stickyHeaderTextStyleBuilder | Style sticky header text per pinned state |
startContent / endContent | Extra lazy list items before/after grouped contacts |
| Module | Description |
|---|
sample | Shared demo UI (App, ContactScreen, etc.) |
androidApp | Android sample shell |
desktopApp | JVM desktop app via Compose Desktop |
webApp | Browser app (Wasm) |
Surfaced from shared tags and platforms — no rankings paid for.