Accompanist Jetpack Navigation Compose Animation Library is deprecated. Compose Navigation can now also do animations so this is no longer necessary. However, the functionality is still in beta version, i.e. from version 2.7.0-beta01 of Compose Navigation Library. Additionally at least Compose version 1.5.0-beta01 must be used.
implementation("androidx.compose.ui:ui:1.5.0-beta01")
implementation("androidx.navigation:navigation-compose:2.7.0-beta01")
So instead of the AnimatedNavHost you can use the normal Compose NavHost. With the new version of the NavHost you can now also set enterTransition, exitTransition, popEnterTransition and popExitTransition.
If you are already using the Accompanist lib you should have a look at the short migration guide, if not maybe a look at the example implementationwill help since the Jetpack Compose doesn’t seem to have any documentation for the beta version yet.
NavHost(
modifier = modifier,
navController = navController,
startDestination = NavigationRoute.MAIN_SCREEN.route
) {
composable(
route = NavigationRoute.MAIN_SCREEN.route,
enterTransition = {
slideIntoContainer(
AnimatedContentTransitionScope.SlideDirection.Left,
animationSpec = tween(700)
)
},
exitTransition = {
slideOutOfContainer(
AnimatedContentTransitionScope.SlideDirection.Right,
animationSpec = tween(700)
)
}
) {
MainScreen(

The complete example implementation is available on Github.