r/react • • 2d ago

OC I made the trending floating tab bar for React Native that shrinks to icons when you scroll

Post image

I first saw this in District: scroll down and the tab bar shrinks to just its icons, scroll up and the labels come back. I wanted the same thing in React Native without writing a custom tab bar for every app, so I turned it into a package.

react-native-shrinking-tab-bar

• Works with the tab navigator you already have. Pass it as tabBar to React Navigation or Expo Router and it reads your icons, labels and badges.

• Animates transforms and opacity only, on the UI thread. On an Android release build it dropped no more frames than the stock tab bar, even with the JS thread blocked.

• Drag along the bar to switch tabs. The indicator follows your finger.

• Shrink, hide or stay put on scroll. Presets, colours, sizes, placement and an optional action button.

• Optional glass: Liquid Glass on iOS 26, a system blur on older iOS, a frosted fill on Android.

• Handles RTL, screen-reader labels, the keyboard and safe areas.

Live demo: https://ninadsutrave.github.io/react-native-shrinking-tab-bar/
GitHub repo: https://github.com/ninadsutrave/react-native-shrinking-tab-bar

It's at 0.1.0, so I'd like to hear what breaks or what you'd change.
If it's useful to you, a star on GitHub helps other people find it.

10 Upvotes

2 comments sorted by

1

u/bluebird355 1d ago

Why would anyone use this? Expo ui gives you that native stuff out of the box, and better

3

u/OnARockSomewhere 1d ago

Fair question, and if native tabs fit your design, use them. They're great!

This is for a different case: you want the bar to shrink as people read, and you want it on both platforms. Native can't quite do that today.

  • iOS 26 native tabs minimize to a single icon when you scroll. The other tabs aren't visible until you expand it again.
  • Android's native bottom nav doesn't shrink at all. It can only stay or hide.
  • This keeps every tab visible and tappable and just drops the labels. It behaves the same on iOS and Android.