style={{backgroundColor:"red"}} doesn't work in tab unable to change background color
how to change tab background color ?
<Tabs renderTabBar={()=> <ScrollableTab />}>
<Tab heading="Tab1">
<Tab1 />
</Tab>
<Tab heading="Tab2">
<Tab2 />
</Tab>
<Tab heading="Tab3">
<Tab3 />
</Tab>
<Tab heading="Tab4">
<Tab4 />
</Tab>
<Tab heading="Tab5">
<Tab5 />
</Tab>
</Tabs>
@StudioAleph use tabStyle and activeTabStyle of <Tab/>.
Usage
<Tabs renderTabBar={() => <ScrollableTab />}>
<Tab heading="Tab1" tabStyle={{ backgroundColor: "red" }} activeTabStyle={{ backgroundColor: "green" }}>
<Text>Tab one</Text>
</Tab>
</Tabs>
This doesn't work if you are rendering an icon in the tab header:
<Tabs>
<Tab
tabStyle={{ backgroundColor: "#5078F2" }}
activeTabStyle={{ backgroundColor: "#5078F2" }}
heading={
<TabHeading>
<Icon name="apps" />
</TabHeading>
}
>
<View>
<Text>Hi there - Tab 1</Text>
</View>
</Tab>
<Tab
tabStyle={{ backgroundColor: "#5078F2" }}
activeTabStyle={{ backgroundColor: "#5078F2" }}
heading={
<TabHeading>
<Icon name="apps" />
</TabHeading>
}
>
<View>
<Text>Hi there - Tab 2</Text>
</View>
</Tab>
</Tabs>
@ghoshabhi #2349
@ghoshabhi you can solve with this if the color its same when active
<Tab
heading={
<TabHeading style={{backgroundColor: '#ffffff'}}>
<Icon name="apps" />
</TabHeading>
}
>
<View>
<Text>Hi there - Tab 1</Text>
</View>
</Tab>
Most helpful comment
@StudioAleph use tabStyle and activeTabStyle of
<Tab/>.Usage