Skip to content

🌀 Stability-focused Compose Multiplatform Navigation Library, fork of Voyager.

License

Notifications You must be signed in to change notification settings

hristogochev/vortex

 
 

Repository files navigation

Maven metadata URL Android API kotlin ktlint License MIT


Logo

Vortex: Spin up your Compose Navigation

Stability-focused Compose Multiplatform Navigation Library, fork of Voyager.

Vortex maintains nearly the same API as Voyager, ensuring seamless integration:

class HomeScreenModel : ScreenModel {
    // ...
}

data object HomeScreen : Screen {

    @Composable
    override fun Content() {
        val screenModel = rememberScreenModel<HomeScreenModel>()
        // ...
    }
}


@Composable
fun App() {
    Navigator(HomeScreen)
}

Documentation

See the project website for documentation and APIs.

Features

Differences with Voyager

Navigation
  • Navigator-Screen Linking:
    Navigators are now directly linked to their parent screen instead of their parent navigator.
  • Automatic Disposal:
    When a screen is disposed, all navigators within it are automatically disposed.
  • Flexible Bottom Sheet Navigation:
    Bottom sheet navigation can now be used in any bottom sheet.
  • Simplified Bottom Sheet Navigators:
    Bottom sheet navigators have been streamlined into simple navigators with a disposeOnForgotten flag.
Transitions
  • Navigator Default Transitions:
    You can specify default navigator overridable screen appear and disappear transitions.
  • Runtime Appear Transition:
    You can specify the appear transition for a screen at runtime.
  • Runtime Disappear Transition:
    You can specify the disappear transition for a screen at runtime.
Lifecycle
  • Screen Disposable Effect:
    A new screen disposable effect is available, tied to the lifecycle of the screen.
  • Reliable Application Lifecycle Owner:
    You can now reliably access the application's multiplatform lifecycle owner without risk of failure to update.
Missing features
  • Android specific state management:
    No support for Android-specific APIs, such as LiveData, Hilt, and RxJava.
  • No screen-specific lifecycle owners:
    Screens no longer override the default LocalLifecycleOwner.
  • No screen registry:
    Unlike Voyager, Vortex does not provide a screen registry.

Acknowledgments

Samples

Basic nav. Tab nav. BottomSheet nav.
navigation-basic navigation-tab navigation-bottom-sheet
Nested nav. ScreenModel Stack API
navigation-nested navigation-screenmodel navigation-stack

About

🌀 Stability-focused Compose Multiplatform Navigation Library, fork of Voyager.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%