Wets
Wets

Reputation: 300

How can I change distance between icons of the tabbar from React Navigation 5?

So, here is what I currently have:

enter image description here

And I need distance between icons to be equal. That's what I'm unable to do using tabStyle prop like this:

tabStyle: {
    width: whatever
}

cause distance is not equal. How can I do so in React Navigation 5?

Upvotes: 0

Views: 133

Answers (1)

satya164
satya164

Reputation: 10145

I assume you want the labels to be as wide as the content instead of stretching to available width. In that case, you need to set width to auto:

tabStyle: {
  width: 'auto'
}

Upvotes: 1

Related Questions