Skip to content

Commit 3ef4b06

Browse files
committed
feat: add per-tab icon sizing
1 parent 1bbcaa2 commit 3ef4b06

29 files changed

Lines changed: 411 additions & 16 deletions

.changeset/tall-icons-grow.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'react-native-bottom-tabs': minor
3+
'@bottom-tabs/react-navigation': minor
4+
---
5+
6+
Add a per-screen option for customizing tab image icon size.

apps/example/src/Examples/NativeBottomTabsOriginalIcons.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default function NativeBottomTabsOriginalIcons() {
2121
component={Contacts}
2222
options={{
2323
tabBarIcon: () => require('../../assets/avatar-1.png'),
24+
tabBarIconSize: 34,
2425
tabBarIconRenderingMode: 'original',
2526
}}
2627
/>

artifacts/issue-561/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Issue 561 device verification
2+
3+
Captured with `agent-device` 0.20.10 against the example app's **Native Bottom Tabs with original icons** screen.
4+
5+
- iOS: iPhone 17 Pro simulator, iOS 26.5. The Avatar tab uses `tabBarIconSize: 34`; neighboring image tabs retain the existing 27 pt default.
6+
- Android: Pixel 10 Pro emulator, Android API 37 at 3x density. The final accessibility hierarchy measured the Avatar image at 102x102 px (34 dp) and the default Chat image at 72x72 px (24 dp).
7+
8+
Artifacts:
9+
10+
- `ios-tab-icon-size.png` and `ios-tab-icon-size-selected.png`
11+
- `ios-tab-icon-size.mp4`
12+
- `android-tab-icon-size.png`
13+
- `android-tab-icon-size.mp4`
14+
- `android-avatar-hierarchy.txt` and `android-default-hierarchy.txt`
15+
- `*-gesture-telemetry.json`
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Page: bottomtabs.example
2+
App: bottomtabs.example
3+
Snapshot: 7 nodes
4+
{"index":0,"type":"android.widget.FrameLayout","label":"Avatar","bundleId":"bottomtabs.example","rect":{"x":320,"y":2613,"width":320,"height":171},"enabled":true,"visibleToUser":true,"hittable":true,"depth":0,"ref":"e1"}
5+
{"index":1,"type":"android.widget.LinearLayout","identifier":"bottomtabs.example:id/navigation_bar_item_content_container","bundleId":"bottomtabs.example","rect":{"x":425,"y":2637,"width":110,"height":147},"enabled":true,"visibleToUser":true,"depth":1,"parentIndex":0,"ref":"e2"}
6+
{"index":2,"type":"android.widget.FrameLayout","identifier":"bottomtabs.example:id/navigation_bar_item_icon_container","bundleId":"bottomtabs.example","rect":{"x":429,"y":2637,"width":102,"height":102},"enabled":true,"visibleToUser":true,"depth":2,"parentIndex":1,"ref":"e3"}
7+
{"index":3,"type":"android.widget.LinearLayout","identifier":"bottomtabs.example:id/navigation_bar_item_inner_content_container","bundleId":"bottomtabs.example","rect":{"x":429,"y":2637,"width":102,"height":102},"enabled":true,"visibleToUser":true,"depth":3,"parentIndex":2,"ref":"e4"}
8+
{"index":4,"type":"android.widget.ImageView","identifier":"bottomtabs.example:id/navigation_bar_item_icon_view","bundleId":"bottomtabs.example","rect":{"x":429,"y":2637,"width":102,"height":102},"enabled":true,"visibleToUser":true,"depth":4,"parentIndex":3,"ref":"e5"}
9+
{"index":5,"type":"android.view.ViewGroup","identifier":"bottomtabs.example:id/navigation_bar_item_labels_group","bundleId":"bottomtabs.example","rect":{"x":425,"y":2742,"width":110,"height":42},"enabled":true,"visibleToUser":true,"depth":2,"parentIndex":1,"ref":"e6"}
10+
{"index":6,"type":"android.widget.TextView","label":"Avatar","value":"Avatar","identifier":"bottomtabs.example:id/navigation_bar_item_small_label_view","bundleId":"bottomtabs.example","rect":{"x":425,"y":2742,"width":109,"height":42},"enabled":true,"visibleToUser":true,"depth":3,"parentIndex":5,"ref":"e7"}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Page: bottomtabs.example
2+
App: bottomtabs.example
3+
Snapshot: 7 nodes
4+
{"index":0,"type":"android.widget.FrameLayout","label":"Chat","bundleId":"bottomtabs.example","rect":{"x":960,"y":2613,"width":320,"height":171},"enabled":true,"visibleToUser":true,"hittable":true,"depth":0,"ref":"e1"}
5+
{"index":1,"type":"android.widget.LinearLayout","identifier":"bottomtabs.example:id/navigation_bar_item_content_container","bundleId":"bottomtabs.example","rect":{"x":1080,"y":2637,"width":79,"height":117},"enabled":true,"visibleToUser":true,"depth":1,"parentIndex":0,"ref":"e2"}
6+
{"index":2,"type":"android.widget.FrameLayout","identifier":"bottomtabs.example:id/navigation_bar_item_icon_container","bundleId":"bottomtabs.example","rect":{"x":1083,"y":2637,"width":72,"height":72},"enabled":true,"visibleToUser":true,"depth":2,"parentIndex":1,"ref":"e3"}
7+
{"index":3,"type":"android.widget.LinearLayout","identifier":"bottomtabs.example:id/navigation_bar_item_inner_content_container","bundleId":"bottomtabs.example","rect":{"x":1083,"y":2637,"width":72,"height":72},"enabled":true,"visibleToUser":true,"depth":3,"parentIndex":2,"ref":"e4"}
8+
{"index":4,"type":"android.widget.ImageView","identifier":"bottomtabs.example:id/navigation_bar_item_icon_view","bundleId":"bottomtabs.example","rect":{"x":1083,"y":2637,"width":72,"height":72},"enabled":true,"visibleToUser":true,"depth":4,"parentIndex":3,"ref":"e5"}
9+
{"index":5,"type":"android.view.ViewGroup","identifier":"bottomtabs.example:id/navigation_bar_item_labels_group","bundleId":"bottomtabs.example","rect":{"x":1080,"y":2712,"width":79,"height":42},"enabled":true,"visibleToUser":true,"depth":2,"parentIndex":1,"ref":"e6"}
10+
{"index":6,"type":"android.widget.TextView","label":"Chat","value":"Chat","identifier":"bottomtabs.example:id/navigation_bar_item_small_label_view","bundleId":"bottomtabs.example","rect":{"x":1080,"y":2712,"width":79,"height":42},"enabled":true,"visibleToUser":true,"depth":3,"parentIndex":5,"ref":"e7"}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"version": 1,
3+
"generatedAt": "2026-08-24T20:37:38.885Z",
4+
"events": [
5+
{
6+
"kind": "tap",
7+
"tMs": 638,
8+
"x": 480,
9+
"y": 2699,
10+
"referenceWidth": 1280,
11+
"referenceHeight": 2856
12+
},
13+
{
14+
"kind": "tap",
15+
"tMs": 6687,
16+
"x": 1120,
17+
"y": 2699,
18+
"referenceWidth": 1280,
19+
"referenceHeight": 2856
20+
}
21+
]
22+
}
235 KB
Binary file not shown.
1.04 MB
Loading
86.2 KB
Loading
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"version": 1,
3+
"generatedAt": "2026-08-24T20:32:29.204Z",
4+
"events": [
5+
{
6+
"kind": "tap",
7+
"tMs": 4578.965576171875,
8+
"x": 201,
9+
"y": 489,
10+
"referenceWidth": 402,
11+
"referenceHeight": 874
12+
},
13+
{
14+
"kind": "tap",
15+
"tMs": 23342.7021484375,
16+
"x": 159,
17+
"y": 822,
18+
"referenceWidth": 402,
19+
"referenceHeight": 874
20+
},
21+
{
22+
"kind": "tap",
23+
"tMs": 29424.4873046875,
24+
"x": 328,
25+
"y": 822,
26+
"referenceWidth": 402,
27+
"referenceHeight": 874
28+
}
29+
]
30+
}

0 commit comments

Comments
 (0)