Navigation

net.zagart.navigation — module: core

Module

ModuleArtifactTargets
:corenet.zagart.navigation:coreAndroid, JVM, iOS

Installation

commonMain.dependencies {
    implementation("net.zagart.navigation:core:1.0.0")
}

Basic Usage

// Define a destination
data class HomeScreen(override val args: Args = Args()) : Destination

// Create controller
val controller = rememberNavigationController(
    startDestinations = listOf(HomeScreen())
)

// Wire up the container
NavigationContainer(
    controller = controller,
    scope = {
        screen<HomeScreen> { HomeContent() }
    }
)

Features

FeatureDetails
Type-safe navigationDestinations as classes implementing Destination with kotlinx-serialization
Backstack managementMultiple independent backstacks (tabs/sections) with state save/restore
Animated transitionsSlide and None transitions with configurable duration
Predictive back gestureSupported on Android

Versioning & Releases

Follows Semantic Versioning with phases: alpha, beta, rc, stable.

  1. Update version in core/build.gradle.kts
  2. Run ./gradlew :core:publish
  3. Release from the Sonatype staging UI
  4. Tag and push: git tag v1.0.0 && git push origin v1.0.0
← Back