[FR] expose tabBarHeight #363
Closed
lovegaoshi
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Hey, if you want to get the height of the tab bar you can use useBottomTabBarHeight() hook. Here is a reference: https://callstackincubator.github.io/react-native-bottom-tabs/docs/guides/usage-with-react-navigation.html#usebottomtabbarheight |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Thank you for the work! excited to see RN being one of the first cross-platform frameworks that support the liquid glass design!
I have a rather obscure use case for bottom tabs - I have a drawer navigator (as I prefer 3 way button than gesture mode) but I'd like to add bottom tabs to support gesture mode as well. I've been doing it using a drawer navigator then a custom made bottom tab right below it.
wanting to rather use the native rendered bottom tabs, I can see myself having 2 options - either replace the drawer with this and make a custom drawer instead, or render dummy screens for the bottom tab then clip the screens to use only the bottom tab part. the latter albeit with some rendering costs, would require minimum work from my side. I'm not sure the former is even achievable if I want the drawer button to be active when the drawer opens, but not switching the screen.
I found by just rendering a
<TabView/>
within a view with a predefined height will do exactly what I want - except I dont know that height. I sawtabBarHeight
is a state and is about 20 pix off (padding?) from my ideal height, so I wonder if I can pitch injecting anonTabBarHeightSet
prop to have information on this height.Beta Was this translation helpful? Give feedback.
All reactions