ComposeCoach — A lightweight Kotlin Multiplatform (KMP) library for Coach Marks
kmp.showcase.mp4
ComposeCoach is a highly customizable KMP library built with Jetpack Compose Multiplatform that allows developers to easily add coach marks and guided user tours across Android, iOS, Desktop, and Web.
Coachmarks help highlight UI components and guide users during onboarding or feature discovery.
Runs seamlessly on:
- Android
- iOS
- Desktop (JVM)
- Web (Compose HTML)
Built entirely with modern declarative UI APIs.
Implement your own:
- Coach styles
- Button layouts
- Reveal animations
- Target shapes
Just wrap your content and mark UI elements using addTarget.
Add the dependency:
Android Project
dependencies {
implementation "com.ruviapps.coachmark:compose-coach-android:<latest-version>"
}Kotlin Multiplatform Project
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("com.ruviapps.coachmark:compose-coach:<latest_version>")
}
}
}
}var showCoachMark by remember { mutableStateOf(true) }val coachMarkState = rememberCoachMarkState()CoachMarkHost(
showCoach = showCoachMark,
state = coachMarkState,
actions = object : DefaultCoachMarkActions() {
override fun onComplete() { showCoachMark = false }
override fun onSkip() { showCoachMark = false }
}
) {
// Your app UI…
}Text(
"Compose Coach",
modifier = Modifier.addTarget(
position = 2,
revealEffect = CircleRevealEffect(),
content = {
Column(
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
"A Highly Customizable Coach Mark Library!!",
color = Color.White,
fontSize = 24.sp,
fontWeight = FontWeight.Bold
)
}
},
backgroundCoachStyle = NoCoachMarkButtons
)
)ComposeCoach is licensed under the MIT License.
Contributions are welcome!
Feel free to open issues or submit PRs.
Happy coding!