QuickNotify is a Kotlin Multiplatform library (powered by Compose Multiplatform) for showing Toast messages, Snackbars, Dialogs, and custom alerts across Android, iOS, Desktop, and Web with zero setup on every platform.
| Platform | Support | Setup required |
|---|---|---|
| Android | Full | None — auto-attaches via App Startup |
| iOS | Full | None — auto-attaches via UIKit overlay |
| Desktop (JVM) | Full | None — auto-attaches via Swing glass pane |
| Web (WasmJS) | Full | None — auto-attaches via canvas overlay |
- Zero setup on all platforms — just call
QuickNotify.showToast(...)anywhere - Global overlay auto-attaches on first use — same pattern as Android on every platform
- Toast with text + icon + custom duration
- Snackbar with icon + custom duration
- Dialog with header image, title, body, up to 3 customizable buttons, optional close icon
- Custom Overlay — show any Composable UI globally with full control over alignment and appearance
- Coroutine-based auto-dismiss
| Platform | Mechanism |
|---|---|
| Android | ComposeView added to the first Activity window via ActivityLifecycleCallbacks (App Startup) |
| Desktop | ComposePanel set as the glassPane of the active JFrame |
| iOS | ComposeUIViewController added as a child view controller on the key UIWindow's root VC |
| Web | A full-screen <canvas> element appended above existing page content |
// settings.gradle.kts
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}dependencies {
implementation("com.github.swatikulkarni123:QuickNotify:2.0.0")
}Important — projects without a WasmJS target
QuickNotify is a Kotlin Multiplatform library that also publishes a
QuickNotify-wasm-jsartifact. If your project does not declare awasmJstarget, Gradle will fail with a variant resolution error similar to:No matching variant of com.github.swatikulkarni123.QuickNotify:QuickNotify-wasm-js:x.x.xFix: exclude the wasm-js artifact on the dependency declaration:
implementation("com.github.swatikulkarni123:QuickNotify:2.0.0") { exclude(group = "com.github.swatikulkarni123.QuickNotify", module = "QuickNotify-wasm-js") }
No setup. No wrapping. Just call it.
QuickNotify.showToast("Hello world!")QuickNotify.showToast(
message = "Saved successfully",
duration = 2500L,
icon = Icons.Default.Check
)QuickNotify.showSnackbar(message = "No internet connection")QuickNotify.showSnackbar(
message = "Message sent",
icon = Icons.Default.Send
)QuickNotify.showDialog(
title = "Delete Item?",
body = "This action cannot be undone.",
btn1Text = "Cancel",
btn1Color = Color.Gray,
onBtn1Click = { },
btn2Text = "Delete",
btn2Color = Color.Red,
onBtn2Click = { /* Delete logic */ }
)QuickNotify.showDialog(
title = "Info",
body = "This is a message-only dialog."
)QuickNotify.showOverlay(
overlayAlignment = Alignment.Center,
autoCancel = false,
content = { dismiss ->
Card(shape = RoundedCornerShape(20.dp)) {
Row {
Text("Operation complete!")
Icon(
imageVector = Icons.Default.Close,
contentDescription = null,
modifier = Modifier.clickable { dismiss() }
)
}
}
}
)QuickNotifyController.clear()MIT
Compose Multiplatform Toast Compose Multiplatform Snackbar Compose Multiplatform Dialog Kotlin Multiplatform Notification Android iOS Desktop Web Compose Alert