Kroute

Kotlin License Maven Central Version example workflow

Kroute

Kroute is a tiny Jetpack Compose Multiplatform navigation library. Its main purpose is to navigate through composables and pass arguments (if any).

If you’d like to use this library for other targets, please let me know by openning an issue.


Although Kroute can be used as a pure navigation library, it also provides several useful extensions that you may find helpful. The library is designed in a way that allows you to choose whether or not to use these extensions.

These two extensions can be combined in various ways. Additionally, there are modules that provide a range of utility functions, which you may find useful if you include both extensions in your project.

Installation

You can install the Kroute library by adding the following to your build.gradle.kts:

implementation("io.github.yandroidua.kroute:<artifact-id>:<latest-version>")

Core (navigation) modules of the Kroute library:

    implementation("io.github.yandroidua.kroute:navigation-arguments:<latest-version>")
    implementation("io.github.yandroidua.kroute:navigation-router:<latest-version>")
    implementation("io.github.yandroidua.kroute:navigation-transition:<latest-version>")
    implementation("io.github.yandroidua.kroute:navigation-ui:<latest-version>")

Viewmodel modules:

Viewmodel extension to the Kroute library:

    implementation("io.github.yandroidua.kroute:ui-viewmodel:<latest-version>")
    implementation("io.github.yandroidua.kroute:viewmodel:<latest-version>")
    implementation("io.github.yandroidua.kroute:lifecycle-viewmodel:<latest-version>")

Koin modules:

Koin extension to the Kroute library:

    implementation("io.github.yandroidua.kroute:lifecycle-koin:<latest-version>")
    implementation("io.github.yandroidua.kroute:ui-koin:<latest-version>")

Koin-Viemodel modules:

If you are considering to have both viewmodel and koin Kroute extensions, there are several modules that ties all this together in a convinient API:

    implementation("io.github.yandroidua.kroute:koin-viewmodel:<latest-version>")
    implementation("io.github.yandroidua.kroute:ui-koin-viewmodel:<latest-version>")
    implementation("io.github.yandroidua.kroute:ui-navigation-koin-viewmodel:<latest-version>")

Sample

Please refer to a sample app for examples.

Android iOS
Wasm JVM desktop