has anyone using compose-navigation figured out a reliable way to match the animation specs of the NavHost with whether or not the navigation is a "tab navigation" to a different graph?
I would have thought that
popEnterTransition
would be activated when using the typical tab navigation -
Hmm could you elaborate further? Do you want a different animation to play when you specifically navigate between your top tabs, but not all other destinations?
thanks Ian - seems like the best way is checking the initial & destination routes and specifying the animation accordingly then 👍
Christopher Mederos
03/10/2025, 11:20 PM
@Stylianos Gakis the idea is to implement the 'Top Level' transition pattern like described in the m3 docs - https://m3.material.io/styles/motion/transitions/transition-patterns#f852afd2-396f-49fd-a265-5f6d96680e16
Personally I like lateral transitions (like turning a book page) for navigating deeper to child routes with detail screens. Then I use a top level transition like a 'blink' when changing tabs to make it clear the content isn't related in any child/parent hierarchy. The default SwiftUI navigation in iOS follows this pattern too and is quite nice. Very doable in compose but it's not the default behaviour