
Cross-target app template sharing UI and core logic with Compose integration, platform-specific entry points, and ready-made build and test tasks including Web/Wasm options.
https://res.cloudinary.com/dgsreulhd/video/upload/v1786301010/main_ui_demo_rcjhan.mp4
Build truly adaptive Kotlin Multiplatform applications using a single shared UI.
KitFlow helps you create responsive layouts across Android, iOS, Desktop and Web with a simple adaptive API.
Add Maven Central in your root settings.gradle.kts or build.gradle.kts:
repositories {
mavenCentral()
}Add the KitFlow dependency in your shared/build.gradle.kts (or version catalog):
// gradle/libs.versions.toml
[versions]
kitflow = "1.1.1"
[libraries]
kitflow = { module = "in.kitflow:kit-flow", version.ref = "kitflow" }
// shared/build.gradle.kts
commonMain.dependencies {
implementation(libs.kitflow)
}Note: Starting with
1.1.1, KitFlow is published underin.kitflow:kit-flow(replacing the previousio.github.vedangj72:kit-flowcoordinates).
Use AdaptiveKitProvider once near the root of your Compose app:
@Composable
fun App() {
AdaptiveKitProvider {
MainScreen()
}
}Everything inside this provider can access all KitFlow responsive values, breakpoints, window metrics, and accessibility resolvers.
KitFlow solves the problem of keeping adaptive UI logic readable, reusable, and shared across platforms:
| Feature | What it gives you |
|---|---|
Adaptive.value() |
Responsive values for layout, spacing, typography, dimensions, shapes, and colors |
Adaptive.onOrientationChange() |
Clear declarative portrait and landscape branching |
AdaptiveFlowGrid |
Constraint-aware auto-fitting grid for reusable components |
KitDrawerScaffold |
Desktop docked sidebar & mobile slide-out overlay drawer scaffolding |
KitNavScaffold |
Desktop sticky top navbar & mobile bottom app-bar scaffolding |
Adaptive.layoutValue() |
Width-based reflow decisions for panels, columns, and reflow triggers |
rememberWindowInfo() |
Stable screen classification and real-time window metrics |
| Responsive Accessibility | Font-scale-aware grid wrapping and AdaptiveAccessibleLayout
|
| Shared Compose UI | Single codebase across Android, iOS, JVM Desktop, and Wasm/JS Web |
https://res.cloudinary.com/dgsreulhd/video/upload/v1786300968/adptive_value_explination_qzdpky.mp4
Every UI value can adapt based on screen size:
val previewPadding = Adaptive.value(
sm = 12.dp,
md = 16.dp,
lg = 20.dp,
tab = 24.dp,
desktop = 28.dp
)
val previewButtonHeight = Adaptive.value(
sm = 40.dp,
md = 44.dp,
lg = 48.dp,
tab = 52.dp,
desktop = 56.dp
)
val previewCardWidth = Adaptive.value(
sm = 220.dp,
md = 260.dp,
lg = 300.dp,
tab = 360.dp,
desktop = 420.dp
)
val previewFontScale = Adaptive.value(
sm = 0.92f,
md = 0.98f,
lg = 1.00f,
tab = 1.06f,
desktop = 1.12f
)Adaptive.value() is not limited to dimensions. It can adapt Dp, Sp, Float, Boolean, Int, Color, Shape, and any custom type based on shortest-side device metrics.
https://res.cloudinary.com/dgsreulhd/video/upload/v1786300958/orientation_android_olbjfh.mp4
https://res.cloudinary.com/dgsreulhd/video/upload/v1786300967/orientation_ios_qeoiih.mp4
Use Adaptive.onOrientationChange(...) when portrait and landscape should genuinely render different layouts:
Adaptive.onOrientationChange(
portrait = {
PortraitContent()
},
landscape = {
LandscapeContent()
}
)Note: For Desktop and Desktop-class layouts, KitFlow treats the layout as Landscape by default.
Read current window metrics anywhere in Compose using rememberWindowInfo():
val info = rememberWindowInfo()
Text("widthDp: ${info.widthDp}")
Text("heightDp: ${info.heightDp}")
Text("screenClass: ${info.screenClass}")
Text("orientation: ${info.orientation}")screenClass: Stable screen class based on shortest side (prevents phone from being categorized as a tablet upon rotation).orientation: Portrait, Landscape, Square, or Unknown.Use Adaptive.layoutValue(...) when a value should follow the current available width, including rotation, split screen, and window resizing:
val paneCount = Adaptive.layoutValue(
sm = 1,
md = 1,
lg = 2,
tab = 3,
desktop = 4
)Adaptive.value(...) is shortest-side based for visual stability; Adaptive.layoutValue(...) is width based for reflow decisions.
AdaptiveFlowGrid automatically fits equal-width columns inside its actual parent constraints:
import com.adaptive.kit_flow.layout.AdaptiveFlowGrid
AdaptiveFlowGrid(
minColumnWidth = 160.dp,
maxColumns = 3,
horizontalSpacing = 12.dp,
verticalSpacing = 12.dp
) {
repeat(6) { index ->
Card {
Text("Item $index", Modifier.padding(16.dp))
}
}
}AdaptiveFlowGrid increases effective minimum column width by default, wrapping earlier instead of clipping text.LazyVerticalGrid for unbounded lists.A complete, responsive drawer navigation scaffolding system.
import com.adaptive.kit_flow.modules.kitcomponent.scaffoldings.KitDrawerScaffold
import com.adaptive.kit_flow.modules.kitcomponent.components.KitDrawerNavigator
import com.adaptive.kit_flow.modules.kitcomponent.utils.KitNavItem
val navItems = listOf(
KitNavItem(id = "home", title = "Home", path = "/home"),
KitNavItem(id = "docs", title = "Documentation", path = "/docs"),
KitNavItem(id = "components", title = "Components", path = "/components")
)
// High-level Scaffolding
KitDrawerScaffold(
navItems = navItems,
activeItem = currentItem,
header = {
Row(verticalAlignment = Alignment.CenterVertically) {
Image(painter = painterResource(Res.drawable.kitflow_icon), contentDescription = null, modifier = Modifier.size(32.dp))
Spacer(Modifier.width(8.dp))
Text("KitFlow App", fontWeight = FontWeight.Bold)
}
},
drawerFooter = {
Text("© 2026 KitFlow", fontSize = 11.sp, color = Color.Gray)
},
body = { activeItem ->
when (activeItem.id) {
"home" -> HomeScreen()
"docs" -> DocsScreen()
"components" -> ComponentsScreen()
}
}
)If you want custom topbars or custom layouts while reusing the drawer navigation:
KitDrawerNavigator(
navItems = navItems,
activeItem = activeNavItem,
onItemSelected = { item -> navigateTo(item.id) },
header = { DrawerHeader() },
drawerFooter = { DrawerFooter() },
drawerWidth = 260.dp
)To deliberately render full-bleed screens without the drawer or top bar, define a root sealed route outside the scaffold:
sealed class AppRoute {
object Login : AppRoute() // Full-bleed screen, NO shell
object FullscreenDemo : AppRoute() // Full-bleed screen, NO shell
object Docs : AppRoute() // Uses the KitDrawerScaffold shell
}
@Composable
fun App() {
var appRoute by remember { mutableStateOf<AppRoute>(AppRoute.Docs) }
when (appRoute) {
is AppRoute.Login -> {
// Completely escapes the shell: No drawer, no toolbar!
LoginScreen(onLoginSuccess = { appRoute = AppRoute.Docs })
}
is AppRoute.FullscreenDemo -> {
FullscreenDemoScreen(onExit = { appRoute = AppRoute.Docs })
}
is AppRoute.Docs -> {
// Shell only wraps authenticated documentation screens
KitDrawerScaffold(
navItems = navItems,
body = { currentItem ->
DocsScreen(currentItem)
}
)
}
}
}Adaptive toolbar and app-bar scaffolding for Compose Multiplatform.
import com.adaptive.kit_flow.modules.kitcomponent.scaffoldings.KitNavScaffold
import com.adaptive.kit_flow.modules.kitcomponent.utils.KitNavItem
val navItems = listOf(
KitNavItem(id = "dashboard", title = "Dashboard", path = "/dashboard"),
KitNavItem(id = "analytics", title = "Analytics", path = "/analytics"),
KitNavItem(id = "settings", title = "Settings", path = "/settings")
)
KitNavScaffold(
navItems = navItems,
activeItem = currentItem,
header = {
Row(verticalAlignment = Alignment.CenterVertically) {
Image(painter = painterResource(Res.drawable.kitflow_icon), contentDescription = null, modifier = Modifier.size(28.dp))
Spacer(Modifier.width(8.dp))
Text("Analytics Suite", fontWeight = FontWeight.Bold, fontSize = 16.sp)
}
},
body = { activeItem ->
when (activeItem.id) {
"dashboard" -> DashboardScreen()
"analytics" -> AnalyticsScreen()
"settings" -> SettingsScreen()
}
}
)KitFlow keeps UI resilient and accessible when font scale increases:
val accessibility = LocalAdaptiveAccessibilityInfo.current
accessibility.fontScale
accessibility.fontScaleClass
accessibility.minimumTouchTarget
accessibility.reducedMotion
accessibility.highContrast
accessibility.differentiateWithoutColorSwaps between a Row and a Column when large system accessibility fonts are active:
AdaptiveAccessibleLayout(
normal = {
Row {
Title()
Actions()
}
},
largeText = {
Column {
Title()
Actions()
}
}
)Modifier
.adaptiveTouchTarget()
.clickable { onClick() }
Modifier.adaptiveSemantics(
label = "Download file",
role = Role.Button
)
AdaptiveIconButton(
icon = Icons.Default.Close,
contentDescription = "Close",
onClick = onClose
)All demonstrations are available as hosted Cloudinary MP4 streams:
| Demo | Hosted URL | Details |
|---|---|---|
| Main UI Showcase | Watch Demo | Comprehensive adaptive resizing and breakpoint showcase |
| Adaptive.value() | Watch Demo | Visual explanation of shortest-side value scaling |
| Android Orientation | Watch Demo | Orientation transitions on Android mobile |
| iOS Orientation | Watch Demo | Fluid device rotation handling on iOS |
weight(...), aspectRatio(...), fillMaxWidth(), and widthIn(...).AdaptiveFlowGrid for self-arranging auto-column layouts.Adaptive.value(...) for stable shortest-side visual values and Adaptive.layoutValue(...) for reflow decisions.KitFlow should resolve adaptive context and adaptive values, not own the UI.
Developers continue using standard Compose components. KitFlow provides the adaptive decisions to make them responsive.
KitFlow ships an official Agent Skill (skills/kitflow/SKILL.md) so AI coding assistants understand KitFlow's exact in.kitflow:kit-flow:1.1.1 APIs, breakpoints, navigation scaffolds, and cross-platform patterns without guessing signatures or imports.
npx skills add vedangj72/KitFlow --skill kitflowWorks with Agent Skills-compatible tools via Skills CLI, including:
agentskills.io compatible agentsin.kitflow:kit-flow:1.1.1 Maven coordinates and com.adaptive.kit_flow imports.AdaptiveKitProvider, Adaptive.value vs Adaptive.layoutValue, AdaptiveFlowGrid, KitNavScaffold, and KitDrawerScaffold accurately.commonMain best practices across Android, iOS, Desktop, and Web.1.1.1 to my Kotlin Multiplatform project and wrap App() in AdaptiveKitProvider."commonMain using KitDrawerScaffold and AdaptiveFlowGrid."KitNavScaffold, a brand header, and footer navigation."https://skills.sh/vedangj72/KitFlow/kitflow after publishing to GitHub and installing via npx skills add)
https://res.cloudinary.com/dgsreulhd/video/upload/v1786301010/main_ui_demo_rcjhan.mp4
Build truly adaptive Kotlin Multiplatform applications using a single shared UI.
KitFlow helps you create responsive layouts across Android, iOS, Desktop and Web with a simple adaptive API.
Add Maven Central in your root settings.gradle.kts or build.gradle.kts:
repositories {
mavenCentral()
}Add the KitFlow dependency in your shared/build.gradle.kts (or version catalog):
// gradle/libs.versions.toml
[versions]
kitflow = "1.1.1"
[libraries]
kitflow = { module = "in.kitflow:kit-flow", version.ref = "kitflow" }
// shared/build.gradle.kts
commonMain.dependencies {
implementation(libs.kitflow)
}Note: Starting with
1.1.1, KitFlow is published underin.kitflow:kit-flow(replacing the previousio.github.vedangj72:kit-flowcoordinates).
Use AdaptiveKitProvider once near the root of your Compose app:
@Composable
fun App() {
AdaptiveKitProvider {
MainScreen()
}
}Everything inside this provider can access all KitFlow responsive values, breakpoints, window metrics, and accessibility resolvers.
KitFlow solves the problem of keeping adaptive UI logic readable, reusable, and shared across platforms:
| Feature | What it gives you |
|---|---|
Adaptive.value() |
Responsive values for layout, spacing, typography, dimensions, shapes, and colors |
Adaptive.onOrientationChange() |
Clear declarative portrait and landscape branching |
AdaptiveFlowGrid |
Constraint-aware auto-fitting grid for reusable components |
KitDrawerScaffold |
Desktop docked sidebar & mobile slide-out overlay drawer scaffolding |
KitNavScaffold |
Desktop sticky top navbar & mobile bottom app-bar scaffolding |
Adaptive.layoutValue() |
Width-based reflow decisions for panels, columns, and reflow triggers |
rememberWindowInfo() |
Stable screen classification and real-time window metrics |
| Responsive Accessibility | Font-scale-aware grid wrapping and AdaptiveAccessibleLayout
|
| Shared Compose UI | Single codebase across Android, iOS, JVM Desktop, and Wasm/JS Web |
https://res.cloudinary.com/dgsreulhd/video/upload/v1786300968/adptive_value_explination_qzdpky.mp4
Every UI value can adapt based on screen size:
val previewPadding = Adaptive.value(
sm = 12.dp,
md = 16.dp,
lg = 20.dp,
tab = 24.dp,
desktop = 28.dp
)
val previewButtonHeight = Adaptive.value(
sm = 40.dp,
md = 44.dp,
lg = 48.dp,
tab = 52.dp,
desktop = 56.dp
)
val previewCardWidth = Adaptive.value(
sm = 220.dp,
md = 260.dp,
lg = 300.dp,
tab = 360.dp,
desktop = 420.dp
)
val previewFontScale = Adaptive.value(
sm = 0.92f,
md = 0.98f,
lg = 1.00f,
tab = 1.06f,
desktop = 1.12f
)Adaptive.value() is not limited to dimensions. It can adapt Dp, Sp, Float, Boolean, Int, Color, Shape, and any custom type based on shortest-side device metrics.
https://res.cloudinary.com/dgsreulhd/video/upload/v1786300958/orientation_android_olbjfh.mp4
https://res.cloudinary.com/dgsreulhd/video/upload/v1786300967/orientation_ios_qeoiih.mp4
Use Adaptive.onOrientationChange(...) when portrait and landscape should genuinely render different layouts:
Adaptive.onOrientationChange(
portrait = {
PortraitContent()
},
landscape = {
LandscapeContent()
}
)Note: For Desktop and Desktop-class layouts, KitFlow treats the layout as Landscape by default.
Read current window metrics anywhere in Compose using rememberWindowInfo():
val info = rememberWindowInfo()
Text("widthDp: ${info.widthDp}")
Text("heightDp: ${info.heightDp}")
Text("screenClass: ${info.screenClass}")
Text("orientation: ${info.orientation}")screenClass: Stable screen class based on shortest side (prevents phone from being categorized as a tablet upon rotation).orientation: Portrait, Landscape, Square, or Unknown.Use Adaptive.layoutValue(...) when a value should follow the current available width, including rotation, split screen, and window resizing:
val paneCount = Adaptive.layoutValue(
sm = 1,
md = 1,
lg = 2,
tab = 3,
desktop = 4
)Adaptive.value(...) is shortest-side based for visual stability; Adaptive.layoutValue(...) is width based for reflow decisions.
AdaptiveFlowGrid automatically fits equal-width columns inside its actual parent constraints:
import com.adaptive.kit_flow.layout.AdaptiveFlowGrid
AdaptiveFlowGrid(
minColumnWidth = 160.dp,
maxColumns = 3,
horizontalSpacing = 12.dp,
verticalSpacing = 12.dp
) {
repeat(6) { index ->
Card {
Text("Item $index", Modifier.padding(16.dp))
}
}
}AdaptiveFlowGrid increases effective minimum column width by default, wrapping earlier instead of clipping text.LazyVerticalGrid for unbounded lists.A complete, responsive drawer navigation scaffolding system.
import com.adaptive.kit_flow.modules.kitcomponent.scaffoldings.KitDrawerScaffold
import com.adaptive.kit_flow.modules.kitcomponent.components.KitDrawerNavigator
import com.adaptive.kit_flow.modules.kitcomponent.utils.KitNavItem
val navItems = listOf(
KitNavItem(id = "home", title = "Home", path = "/home"),
KitNavItem(id = "docs", title = "Documentation", path = "/docs"),
KitNavItem(id = "components", title = "Components", path = "/components")
)
// High-level Scaffolding
KitDrawerScaffold(
navItems = navItems,
activeItem = currentItem,
header = {
Row(verticalAlignment = Alignment.CenterVertically) {
Image(painter = painterResource(Res.drawable.kitflow_icon), contentDescription = null, modifier = Modifier.size(32.dp))
Spacer(Modifier.width(8.dp))
Text("KitFlow App", fontWeight = FontWeight.Bold)
}
},
drawerFooter = {
Text("© 2026 KitFlow", fontSize = 11.sp, color = Color.Gray)
},
body = { activeItem ->
when (activeItem.id) {
"home" -> HomeScreen()
"docs" -> DocsScreen()
"components" -> ComponentsScreen()
}
}
)If you want custom topbars or custom layouts while reusing the drawer navigation:
KitDrawerNavigator(
navItems = navItems,
activeItem = activeNavItem,
onItemSelected = { item -> navigateTo(item.id) },
header = { DrawerHeader() },
drawerFooter = { DrawerFooter() },
drawerWidth = 260.dp
)To deliberately render full-bleed screens without the drawer or top bar, define a root sealed route outside the scaffold:
sealed class AppRoute {
object Login : AppRoute() // Full-bleed screen, NO shell
object FullscreenDemo : AppRoute() // Full-bleed screen, NO shell
object Docs : AppRoute() // Uses the KitDrawerScaffold shell
}
@Composable
fun App() {
var appRoute by remember { mutableStateOf<AppRoute>(AppRoute.Docs) }
when (appRoute) {
is AppRoute.Login -> {
// Completely escapes the shell: No drawer, no toolbar!
LoginScreen(onLoginSuccess = { appRoute = AppRoute.Docs })
}
is AppRoute.FullscreenDemo -> {
FullscreenDemoScreen(onExit = { appRoute = AppRoute.Docs })
}
is AppRoute.Docs -> {
// Shell only wraps authenticated documentation screens
KitDrawerScaffold(
navItems = navItems,
body = { currentItem ->
DocsScreen(currentItem)
}
)
}
}
}Adaptive toolbar and app-bar scaffolding for Compose Multiplatform.
import com.adaptive.kit_flow.modules.kitcomponent.scaffoldings.KitNavScaffold
import com.adaptive.kit_flow.modules.kitcomponent.utils.KitNavItem
val navItems = listOf(
KitNavItem(id = "dashboard", title = "Dashboard", path = "/dashboard"),
KitNavItem(id = "analytics", title = "Analytics", path = "/analytics"),
KitNavItem(id = "settings", title = "Settings", path = "/settings")
)
KitNavScaffold(
navItems = navItems,
activeItem = currentItem,
header = {
Row(verticalAlignment = Alignment.CenterVertically) {
Image(painter = painterResource(Res.drawable.kitflow_icon), contentDescription = null, modifier = Modifier.size(28.dp))
Spacer(Modifier.width(8.dp))
Text("Analytics Suite", fontWeight = FontWeight.Bold, fontSize = 16.sp)
}
},
body = { activeItem ->
when (activeItem.id) {
"dashboard" -> DashboardScreen()
"analytics" -> AnalyticsScreen()
"settings" -> SettingsScreen()
}
}
)KitFlow keeps UI resilient and accessible when font scale increases:
val accessibility = LocalAdaptiveAccessibilityInfo.current
accessibility.fontScale
accessibility.fontScaleClass
accessibility.minimumTouchTarget
accessibility.reducedMotion
accessibility.highContrast
accessibility.differentiateWithoutColorSwaps between a Row and a Column when large system accessibility fonts are active:
AdaptiveAccessibleLayout(
normal = {
Row {
Title()
Actions()
}
},
largeText = {
Column {
Title()
Actions()
}
}
)Modifier
.adaptiveTouchTarget()
.clickable { onClick() }
Modifier.adaptiveSemantics(
label = "Download file",
role = Role.Button
)
AdaptiveIconButton(
icon = Icons.Default.Close,
contentDescription = "Close",
onClick = onClose
)All demonstrations are available as hosted Cloudinary MP4 streams:
| Demo | Hosted URL | Details |
|---|---|---|
| Main UI Showcase | Watch Demo | Comprehensive adaptive resizing and breakpoint showcase |
| Adaptive.value() | Watch Demo | Visual explanation of shortest-side value scaling |
| Android Orientation | Watch Demo | Orientation transitions on Android mobile |
| iOS Orientation | Watch Demo | Fluid device rotation handling on iOS |
weight(...), aspectRatio(...), fillMaxWidth(), and widthIn(...).AdaptiveFlowGrid for self-arranging auto-column layouts.Adaptive.value(...) for stable shortest-side visual values and Adaptive.layoutValue(...) for reflow decisions.KitFlow should resolve adaptive context and adaptive values, not own the UI.
Developers continue using standard Compose components. KitFlow provides the adaptive decisions to make them responsive.
KitFlow ships an official Agent Skill (skills/kitflow/SKILL.md) so AI coding assistants understand KitFlow's exact in.kitflow:kit-flow:1.1.1 APIs, breakpoints, navigation scaffolds, and cross-platform patterns without guessing signatures or imports.
npx skills add vedangj72/KitFlow --skill kitflowWorks with Agent Skills-compatible tools via Skills CLI, including:
agentskills.io compatible agentsin.kitflow:kit-flow:1.1.1 Maven coordinates and com.adaptive.kit_flow imports.AdaptiveKitProvider, Adaptive.value vs Adaptive.layoutValue, AdaptiveFlowGrid, KitNavScaffold, and KitDrawerScaffold accurately.commonMain best practices across Android, iOS, Desktop, and Web.1.1.1 to my Kotlin Multiplatform project and wrap App() in AdaptiveKitProvider."commonMain using KitDrawerScaffold and AdaptiveFlowGrid."KitNavScaffold, a brand header, and footer navigation."https://skills.sh/vedangj72/KitFlow/kitflow after publishing to GitHub and installing via npx skills add)