react-native-tab-view icon indicating copy to clipboard operation
react-native-tab-view copied to clipboard

Varying tab width

Open yayanartha opened this issue 9 years ago • 4 comments

How to produce a different tab width regarding to length of the tab label like the image below. And how can I make the indicator bar length align with the label? screen shot 2017-05-19 at 3 26 39 pm

yayanartha avatar May 19 '17 07:05 yayanartha

Hi @yayanartha! I'll suggest you to have a look at one of the examples provided in the repo, and tweak the renderHeader() method as you wish.

You can check out how tabviews' length are handle in TabBar right here.

If you face any bug working on this, let us know by re-opening this issue and providing your code on Expo's Snack if you can, so that we'll be able to help you!

CharlesMangwa avatar May 21 '17 19:05 CharlesMangwa

No, I mean different width for each tab. Say I have 4 tabs, each width is different. Can it be?

yayanartha avatar May 22 '17 01:05 yayanartha

It's not possible right now since it's a bit complex to do. PRs welcome.

satya164 avatar May 22 '17 01:05 satya164

@satya164 Great work! Hi, i've read your blog on medium and i'm currently using this component. I'm sure you agree things can be improved and that's what the community is for. From What i read in the blog , you mentioned that you were trying to build it as per material guidelines but not having dynamic tab width in tabbar is really a big feature to miss out. I would request you to please take this feature as a priority and work on this. Hope you consider the request and spend some time on it. I myself will try making a PR this weekend. Thanks.

code-smith avatar Aug 17 '17 12:08 code-smith