
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>()
}
}
{
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.
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
- Big thanks to Adriel Café and all contributors of the
original Voyager library.
Samples