React-native-tab-view: How to change the color of underline in tabView?

Created on 3 Apr 2018  路  3Comments  路  Source: satya164/react-native-tab-view

I want to change the color and width, Height of underline view? How to achieve the same.

Current behaviour

Currently it shows a yellow underline below the current selected tab.

Expected behaviour

Change the height and width and color of current selected tab.

Most helpful comment

https://github.com/react-native-community/react-native-tab-view#tabbar-

indicatorStyle={{ backgroundColor: 'blue', height: 2 }}

All 3 comments

https://github.com/react-native-community/react-native-tab-view#tabbar-

indicatorStyle={{ backgroundColor: 'blue', height: 2 }}

@satya164 your example for on touch in ios how to add always on indicator on current selected tab

https://github.com/satya164/react-native-tab-view#tabbar

  _renderTabBar = props => {
    return <TabBar
      {...props}
      inactiveColor={colors.text}
      activeColor={colors.text}
      indicatorStyle={{ backgroundColor: colors.text }}
      style={{ backgroundColor: colors.background }}
    />

  };
Was this page helpful?
0 / 5 - 0 ratings

Related issues

jasonkw9 picture jasonkw9  路  3Comments

nastarfan picture nastarfan  路  3Comments

QuentinBrosse picture QuentinBrosse  路  4Comments

f6m6 picture f6m6  路  3Comments

satya164 picture satya164  路  3Comments