A modern, 100% clean-room Jetpack Compose and Material 3 chat UI library inspired by and succeeding stfalcon-studio/ChatKit.
Note
Independent Community Project & Deep Gratitude ChatKit-Compose is an independent, community-built Jetpack Compose successor—not an official Stfalcon product. We owe huge thanks to Stfalcon for designing one of the cleanest, most model-agnostic chat UI libraries in Android history. Our goal is to help every developer move forward with Jetpack Compose and Material 3 effortlessly, without throwing away existing data models or doing heavy rewrites.
All screenshots below are generated automatically from live Compose UI instrumentation tests (ChatKitShowcaseInstrumentationTest.kt) running on an Android device:
| Dialogs (Light) | Dialogs (Dark) | Chat Thread (Light) | Chat Thread (Dark) |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Map, Poll, Voice & Video | Document, Contact & Security | Attachment Picker Tray | Voice Recording & Profile |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
- Zero Data-Layer Rewrite: Keep your existing
IUser,IMessage,IDialog, andMessageContentTypeimplementations. - Effortless Adapter Migration: Prefer incremental migration? Use
rememberMessagesListStateandrememberDialogsListStatewith familiar methods (addToStart,addToEnd,update,deleteById,unselectAllItems,updateDialogWithMessage,scrollToMessageId,getMessageTimelineIndex). - Pure Jetpack Compose Idioms: Every component (
MessagesList,DialogsList,MessageInput,ChatProfileSection) exposes strict state hoisting and standardModifierconventions. - Material 3 Out of the Box: Automatic Light/Dark theme and dynamic color support via
ChatKitDefaults. - Complete Built-in Rich Message Types:
- Images (
MessageContentType.Image/ChatMessagewith+N filesbadge & missing-media handling) - GIFs (
MessageContentType.Gif/GifMessagewithAUTO/STATICanimation badge) - Videos (
MessageContentType.Video/VideoMessagewith play overlay, duration, file size,+N files) - Voice Messages (
MessageContentType.Voice/VoiceMessagewith interactive waveform scrubber &1x/1.5x/2xplayback speed) - Polls & Surveys (
MessageContentType.Poll/PollMessagewith animated vote bars & percentage breakdown) - Locations & Maps (
MessageContentType.Location/LocationMessagewith stylized map canvas, pin & coordinates) - Contacts (
MessageContentType.Contact/ContactMessagewith avatar, organization/phone/email & key fingerprint) - Documents & Files (
MessageContentType.Document/DocumentMessage+ChatFileTypeDetector) - System & Security Events (
MessageContentType.SystemEvent/SystemEventMessage) - Custom Types: Pluggable
CustomContentConfig.BuilderKotlin DSL replacing XMLViewHolderboilerplate.
- Images (
- Granular Animation & Feature Control:
- Toggle individual animations or disable all animations globally via
ChatKitAnimationConfig.Disabled. - Enable/disable message types, replies, reactions, multi-selection, spoiler/privacy masking (
isMasked), and message chunk counters (maxMessageChunkSize) viaChatKitFeatureConfig.
- Toggle individual animations or disable all animations globally via
- Built-in Attachment Picker, Voice Recorder & Profile Screen:
rememberChatAttachmentLauncherswraps Android Photo Picker & SAF multi-document selection.VoiceRecorderStatedrives an interactive live-waveform recording bar insideMessageInput.ChatProfileSectionrenders customizable user/group info, verification chips, quick actions, and member lists.
Add the JitPack repository in settings.gradle.kts:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}Add the dependency in your module's build.gradle.kts:
dependencies {
implementation("com.github.Hatzen:ChatKit-Compose:1.0.0")
}val currentUser = ChatUser(id = "me", name = "Kai", isOnline = true)
val peer = ChatUser(id = "alice", name = "Alice", isOnline = true)
val messagesState = rememberMessagesListState(
senderId = currentUser.id,
initialMessages = listOf(
ChatMessage(
id = "1",
text = "Welcome to ChatKit-Compose!",
user = peer,
createdAt = Date(),
),
),
)ProvideChatKitAnimationConfig(
if (animationsEnabled) ChatKitAnimationConfig.Default else ChatKitAnimationConfig.Disabled
) {
ProvideChatKitFeatureConfig(
ChatKitFeatureConfig(
enablePolls = true,
enableLocations = true,
enableVoiceMessages = true,
maxMessageChunkSize = 140,
)
) {
ChatScreen()
}
}Scaffold(
bottomBar = {
MessageInput(
onSendMessage = { text ->
messagesState.addToStart(
ChatMessage(
id = UUID.randomUUID().toString(),
text = text,
user = currentUser,
createdAt = Date(),
),
scroll = true,
)
true
},
onAttachmentOptionSelected = { kind -> /* handle Image, Gif, Video, File, Poll, Location, Contact */ },
onVoiceMessageRecorded = { durationSeconds, waveform ->
messagesState.addToStart(
VoiceMessage(
id = UUID.randomUUID().toString(),
audioUrl = "local://voice.opus",
durationSeconds = durationSeconds,
waveform = waveform,
user = currentUser,
),
)
},
)
},
) { innerPadding ->
MessagesList(
state = messagesState,
onSelectionChanged = { selectedCount -> /* toggle contextual TopAppBar */ },
onAvatarClick = { user -> openProfile(user) },
onPollVote = { pollMessage, optionId -> /* update poll state */ },
onLoadMore = { page, totalItemsCount -> /* append older history */ },
modifier = Modifier
.fillMaxSize()
.padding(innerPadding),
)
}DialogsList(
dialogs = dialogs,
onDialogClick = { dialog -> openThread(dialog.id) },
onDialogLongClick = { dialog -> showDialogOptions(dialog) },
)
ChatProfileSection(
title = peer.name,
avatarUrl = peer.avatar,
subtitle = "Online • End-to-end encrypted",
isOnline = peer.isOnline,
verificationBadge = "Verified Identity",
quickActions = listOf(
ChatProfileQuickAction("msg", "Message", ChatKitIcons.Send) { openChat() },
ChatProfileQuickAction("keys", "Rotate Keys", ChatKitIcons.Key) { refreshKeys() },
),
items = listOf(
ChatProfileItem.SectionHeader("Security"),
ChatProfileItem.StaticInfo("Fingerprint", "SHA256:9F82-A1C0", isMonospace = true),
ChatProfileItem.Action("Reset Session Keys", isDestructive = true) { resetKeys() },
),
)- 👉 Side-by-Side Migration Guide (
MIGRATION.md) — XML + Adapter vs Compose equivalents. - 🔍 Curated
stfalcon-studio/ChatKitGitHub Issues Audit (docs/STFALCON_ISSUES_ANALYSIS.md) — 18 high-value community issues resolved natively. - 🛠️ ParAnnoying Messenger Audit & Notes (
docs/PARANNOYING_MIGRATION_NOTES.md) — Real-world workarounds removed inChatKit-Compose.
AGENTS.md— Architecture, Compose API guidelines, and Git workflow rules..agents/rules/— Contextual coding and Git rules..agents/skills/— Reusableverify-buildandmigrate-chatkitworkflows..editorconfig&config/detekt/detekt.yml— Kotlin & Compose static analysis rules.
Run unit tests, instrumentation tests, and debug builds locally:
.\gradlew.bat testDebugUnitTest assembleDebug
.\gradlew.bat :sample:connectedDebugAndroidTestLicensed under the Apache License, Version 2.0. See LICENSE and NOTICE for full details and attribution to stfalcon-studio/ChatKit.








