Skip to content

[iOS 26+] headerTitle custom component renders blank #12915

@dsanmart

Description

@dsanmart

Current behavior

Providing a custom component to options.headerTitle results in a blank space on iOS 26+. The same code renders correctly on Android.

The custom component, even if it is a simple View with background Color. On iOS, the headerLeft and headerRight elements render correctly, but the headerTitle area is empty.

Current Behavior:

Android: The custom component passed to headerTitle renders as expected.

iOS: The headerTitle area is blank/invisible.

Expected behavior

The custom component should render in the header center (or aligned left depending on config) on iOS, identical to Android.
Expected behaviour is what is seen on Android (right device of the picture below).

Image

Reproduction

import React from 'react';
import { View, Text, Image } from 'react-native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

const Stack = createNativeStackNavigator();

function CustomHeaderTitle() {
  // Simple component with explicit dimensions for testing
  return (
    <View style={{ flexDirection: 'row', alignItems: 'center' }}>
      <View style={{ width: 40, height: 40, backgroundColor: 'yellow', borderRadius: 20 }} />
      <View style={{ marginLeft: 10 }}>
        <Text style={{ fontWeight: 'bold' }}>Host Name</Text>
        <Text>Subtitle info</Text>
      </View>
    </View>
  );
}

function MyStack() {
  return (
    <Stack.Navigator>
      <Stack.Screen
        name="Home"
        component={HomeScreen}
        options={{
          // Works on Android, Blank on iOS
          headerTitle: (props) => <CustomHeaderTitle {...props} />, 
        }}
      />
    </Stack.Navigator>
  );
}

Tried to make a Snack but it is giving non-sense errors with dependencies etc: https://snack.expo.dev/@vtwoptwo/broken-headertitle-component?platform=ios

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-drawer-layout
  • react-native-tab-view

Environment

@react-navigation/bottom-tabs": "^7.9.0",
@react-navigation/native": "^7.1.26",
@react-navigation/native-stack": "^7.9.0"

React Native version: 0.81.5
Expo version: 54

Platform: iOS

Architecture: Fabric (New Architecture) Enabled

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions