
Floating navigation bar with animated selection, drag-to-select, badges and adjacent action; customizable frosted/glass surfaces, configurable icons/colors, and a host layout for safe-area placement and content padding.
A floating navigation bar for the places your app goes.
Compose Pill brings animated selection, expressive surfaces and flexible navigation to Compose Multiplatform. Use your own destinations, icons and colors while your app stays in control of navigation.
Documentation & live Wasm demo · Usage guide · Releases · Contributing
Android · iOS · Desktop JVM · Compose Wasm
PillBarLayout host provides safe-area placement and measured bottom padding for scrolling content.Resolve dependencies from Maven Central and add Compose Pill to your shared source set:
commonMain.dependencies {
implementation("io.github.samuolis:pill:0.1.0")
}Provide destinations and react to selections using your existing navigation code:
val destinations = listOf(
PillNavigationItem("home", "Home", icon = { selected -> HomeIcon(selected) }),
PillNavigationItem("saved", "Saved", icon = { selected -> SavedIcon(selected) }),
)
PillNavigationBar(
items = destinations,
selectedKey = currentRoute,
onSelect = { route -> navigate(route) },
scrubEnabled = true,
)HomeIcon, SavedIcon, currentRoute and navigate are supplied by your application. For backdrop sampling, placement, scroll behavior and complete API guidance, see the usage guide.
Try the interactive Wasm demo in a supported browser. It downloads the Compose WebAssembly runtime on first load. The same sample also runs on desktop and iOS:
./gradlew :sample:run # desktop
./gradlew :sample:wasmJsBrowserDevelopmentWebpack # web bundle
./gradlew :sample:linkDebugFrameworkIosSimulatorArm64 # iOS simulator frameworkFor iOS, open iosApp/PillSample.xcodeproj after building the framework. Android and iOS builds require their platform SDKs.
Frost and glass are custom effects built with Haze; they are not Apple's native Liquid Glass API. Effects can fall back on unsupported renderers. Apps should apply reduced-motion and reduced-transparency preferences, provide localized accessible destination names, and verify contrast, safe areas, keyboard behavior and performance on their target devices. See usage for details.
Run ./gradlew :pill:jvmTest for JVM tests. See contributing and release setup. Compose Pill is licensed under Apache 2.0.
The sample and website use the Inter typeface and Lucide icons, under their respective open-source licenses.
A floating navigation bar for the places your app goes.
Compose Pill brings animated selection, expressive surfaces and flexible navigation to Compose Multiplatform. Use your own destinations, icons and colors while your app stays in control of navigation.
Documentation & live Wasm demo · Usage guide · Releases · Contributing
Android · iOS · Desktop JVM · Compose Wasm
PillBarLayout host provides safe-area placement and measured bottom padding for scrolling content.Resolve dependencies from Maven Central and add Compose Pill to your shared source set:
commonMain.dependencies {
implementation("io.github.samuolis:pill:0.1.0")
}Provide destinations and react to selections using your existing navigation code:
val destinations = listOf(
PillNavigationItem("home", "Home", icon = { selected -> HomeIcon(selected) }),
PillNavigationItem("saved", "Saved", icon = { selected -> SavedIcon(selected) }),
)
PillNavigationBar(
items = destinations,
selectedKey = currentRoute,
onSelect = { route -> navigate(route) },
scrubEnabled = true,
)HomeIcon, SavedIcon, currentRoute and navigate are supplied by your application. For backdrop sampling, placement, scroll behavior and complete API guidance, see the usage guide.
Try the interactive Wasm demo in a supported browser. It downloads the Compose WebAssembly runtime on first load. The same sample also runs on desktop and iOS:
./gradlew :sample:run # desktop
./gradlew :sample:wasmJsBrowserDevelopmentWebpack # web bundle
./gradlew :sample:linkDebugFrameworkIosSimulatorArm64 # iOS simulator frameworkFor iOS, open iosApp/PillSample.xcodeproj after building the framework. Android and iOS builds require their platform SDKs.
Frost and glass are custom effects built with Haze; they are not Apple's native Liquid Glass API. Effects can fall back on unsupported renderers. Apps should apply reduced-motion and reduced-transparency preferences, provide localized accessible destination names, and verify contrast, safe areas, keyboard behavior and performance on their target devices. See usage for details.
Run ./gradlew :pill:jvmTest for JVM tests. See contributing and release setup. Compose Pill is licensed under Apache 2.0.
The sample and website use the Inter typeface and Lucide icons, under their respective open-source licenses.