This page covers only the Screen Transitions navigator setup. It assumes your app already has Expo Router or React Navigation configured.
Expo Router
Screen Transitions exports a BlankStack that is ready to use in an Expo Router layout. Replace the stack in the layout where you want Screen Transitions:
TSX
You can use BlankStack in the root layout or a nested _layout.tsx. Only the routes inside that layout participate in its transition stack.
Expo Router remains responsible for routing. Continue to navigate with router.push(), router.replace(), router.back(), or Link as usual.
React Navigation
Screen Transitions exports the same Blank Stack for React Navigation through its React Navigation entry point:
TSX
Your screens continue to use navigation.navigate(), navigation.goBack(), and the rest of the standard React Navigation API.
Adapting a native stack
withScreenTransitions wraps an existing native stack so individual screens can use Screen Transitions animations while the rest retain native-stack behavior:
TSX
Use the adapter when you specifically need a native stack. For a stack driven entirely by Screen Transitions, use Blank Stack.