react-navigation / react-navigation/react-navigation

Animating Header During Navigation Causes Screen Breaks/Jumps

Open
#12,275 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug platform:android platform:ios repro provided
Dominant language
TypeScript
Stars
24.5k
Forks
5.1k
Avg merge
1d 5h
Merged PRs (30d)
18

Description

Current behavior

Hi,

I'm trying to create a header navigation with a height minimization animation during page transitions.

Everything works well, but I noticed an issue: during the transition to the next screen, the container height of the new screen doesn’t adjust along with the header height change. This causes noticeable jumps on the screen.

In other words, native screen layout measurements during the transition are frozen, which causes jumps in the end.

I tried with @react-navigation/stack but still the same result.

To make it easier to observe, I set the background color to red in the navigator theme.

Please check the attached video for reference.

https://github.com/user-attachments/assets/e763ee34-ab4d-440a-9351-9652d8760818

Expected behavior

The screen container height should be increased according to the header height decrease.
In other word screen should be in sync with header height modification.

I dropped a Snack link, so that you can check the structure that I have for the screen.

Reproduction

https://snack.expo.dev/@beqram0/blessed-yellow-turkish-delight

Platform
  • Android
  • iOS
  • Web
  • Windows
  • MacOS
Packages
  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • @react-navigation/native-stack
  • react-native-tab-view
Environment
  • [] I've removed the packages that I don't use
package version
@react-navigation/native 6.1.17
@react-navigation/bottom-tabs 6.5.20
@react-navigation/native-stack ~6.9.26
react-native-screens 3.29
react-native-gesture-handler 2.12.1
react-native-reanimated 3.6.0
react-native 0. 71.18

I tried to update react-navigation. reanimated, gesture-handler but still the same result.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with the linked Snack and reproduce the behavior on Android and iOS using the listed native-stack and bottom-tabs packages. Trace how the animated header height affects the native screen container during navigation; done means the screen expands as the header shrinks without visible jumps.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.