Add tabStyle to active tab only
See original GitHub issueVersion 4.0.0-beta.31
I’m asking if there’s a way to add a tabStyle to the active tab. This way you would be able to add a different style to the whole tab on the active state. I might just be missing something in the docs but I’m not able to see something to do this with
This is what I’m trying to achieve
I started to make a custom component but didn’t want to do this as there’s more configuration.
Here is the code
<Scene
key="Tabs"
tabs={true}
tabBarPosition="bottom"
activeBackgroundColor="#282828"
inactiveBackgroundColor="#282828"
inactiveTintColor="#6E6E6E"
activeTintColor={'white'}
tabBarStyle={{
backgroundColor: '#282828'
}}
tabStyle={{
width: '100%',
height: '100%',
borderTopColor: 'grey',
borderTopWidth: 4,
marginTop: -1,
paddingTop: 10
}}
swipeEnabled={false}
animationEnabled={false}
panHandlers={null}
initial={true}
>
.... tabs content
</Scene>
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Applying styling to active tabs - javascript - Stack Overflow
I want to apply the same style to an active tab as when hovered over (see code). I am ...
Read more >Create a Custom Object Tab - Salesforce Help
From Setup, in the Quick Find box, enter Tabs , then select Tabs. Click New in the Custom Object Tabs related list. Select...
Read more >W3.CSS Tabs - W3Schools
Tabbed navigation is a way to navigate around a website. Normally, tabbed navigation uses navigation buttons (tabs) arranged together with the selected tab...
Read more >TabNavigator reference - React Navigation
When true , tabs are rendered only when they are made active. removeClippedSubviews - Defaults to true . ... tabStyle - Style object...
Read more >My tab style selector isn't working - Salesforce Stack Exchange
@Swetha, I've just added a screenshot and edit - not sure if that clarifies it anymore for you... I'm also extremely perplexed by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nice - thank you. Please, when you do, refer to this issue. I’ll keep this opened and marked as
feature request
.Hi @daviscabral I haven’t yet, I don’t really want to make a custom component as I would have to route all of the push / pops.
If the lib could have a active style prop for the container / single tab of the tab view that would be great. As you can see above I have added a border top to the whole container but I want to add it every tab and then change it to white when active.
When I have some time I’m going to have a look though the code and see if I can work it out. If so I will make a PR.