Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Tab icon size is hard-coded to 27x27pt with no way to override it

Abierto
#561 0 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
react-native, swift, typescript
Área
api, mobile

Línea de trabajo

Empieza por la React Native tab options API y los dos puntos de llamada de iOS en ios/TabViewProvider.swift:60 y ios/TabViewImpl.swift:350. Comprueba cómo llegarían un navigator-level default y un per-screen override a ambas rutas de tamaño fijo, incluida la cuestión del layout de Android mencionada en la proposal. Se considera terminado cuando la API elegida permite que un tab icon use un tamaño diferente sin romper el comportamiento predeterminado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Summary

Tab icon size is hard-coded to 27×27pt with no way to override it, which makes it impossible to give a single tab item a larger icon.

Where

Two independent call sites, both fixed:

  • ios/TabViewProvider.swift:60 — private var iconSize = CGSize(width: 27, height: 27), applied to remotely-loaded icons via image.resizeImageTo(size: iconSize).
  • ios/TabViewImpl.swift:350 — let iconSize = CGSize(width: 27, height: 27) inside makeTabBarItemImage, used on the experimental_bakedTintColors path.

Because remote images are resized to iconSize, supplying a larger source image has no effect.

Use case

We show the signed-in user's avatar as the Profile tab's icon (a snapshot of our own circular avatar component, handed over as a file:// PNG). Design wants that avatar rendered noticeably larger than the neighbouring glyph icons, which is a common pattern for a "you" tab — the avatar is a photo of a person rather than a symbol, so it reads better at a larger size, especially with the label hidden via tabBarLabel: ''.

At 27pt it is legible but visibly smaller than intended, and there is currently no prop, per-screen option, or imageInsets-style escape hatch to change it.

Proposal

Expose the icon size, ideally per screen so one item can differ from the rest:

<Tab.Screen
  name="Profile"
  options={{
    tabBarIcon: () => ({ uri: avatarFileUri }),
    tabBarIconSize: 34, // new
  }}
/>

A navigator-level default (iconSize on Tab.Navigator) with a per-screen override would also work for us. Happy to open a PR if you'd like it in this shape — wanted to check the preferred API first, and whether per-screen sizing raises layout concerns on Android's BottomNavigationView that aren't obvious from the iOS side.

Environment
  • react-native-bottom-tabs 1.4.0 / @bottom-tabs/react-navigation 1.4.0
  • React Native 0.85.3, Expo SDK 56, New Architecture, React 19.2.3
  • iOS 26.5 simulator (iPhone 17 Pro), Xcode 26.6
Lenguaje dominante
TypeScript
Estrellas
1.5k
Forks
108
Merge medio
22 h 36 min
PR fusionados (30 d)
10

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstack/react-native-bottom-tabs

Todos los issues de callstack/react-native-bottom-tabs

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.