Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

New Feature: Headers #210

shovel-kun started this conversation in Ideas
Oct 31, 2024 · 10 comments · 1 reply
Discussion options

As stated in the React Navigation docs (6.x and 7.x), @react-navigation/bottom-tabs allows for headers to be displayed and configured alongside the screen content.

However, as @react-navigation/bottom-tabs is a JS implementation, so too are the headers.

Does react-native-bottom-tabs plan to support headers?

If so, there are two ways to approach this:

  1. Use the JS implementation of headers (simpler):
    • We can reuse the same implementation for headers as seen in BottomTabView.tsx.
    • Since we're using the same API as JS Bottom Tabs, headers should work the same way especially animations, etc.
    • However, we might want to make it clear that unlike the bottom tab, headers are JS implementation.
  2. Use native implementation of headers (harder)

Thoughts?

You must be logged in to vote

Replies: 10 comments 1 reply

Comment options

Hey!

Thanks for opening this issue, I think it's a valid feature request.

I would prefer to keep this library native so I guess the only viable option is to add native headers support.

SwiftUI should be fairly simple but Android needs a second native component to render the top bar.

We can keep the options limited as JS tabs did.

You must be logged in to vote
0 replies
Comment options

Small update:

I got iOS to work with just few lines of code and it looks great!

CleanShot.2024年11月01日.at.15.18.30.mp4

I will investigate what we need to support Android

You must be logged in to vote
0 replies
Comment options

Awesome!!! Is it able to animate when navigating? Bottom Tab Screen -> Another Screen?

You must be logged in to vote
0 replies
Comment options

Not sure if this is related, but would it be possible to add an option to completely hide the header, or at least add a background color to it?

Screenshot 2024年11月03日 at 12 17 48
You must be logged in to vote
0 replies
Comment options

Not sure if this is related, but would it be possible to add an option to completely hide the header, or at least add a background color to it?

Screenshot 2024年11月03日 at 12 17 48

Hey @gunnartorfis try with ignoresTopSafeArea then your view will stretch above it

You must be logged in to vote
0 replies
Comment options

@okwasniewski Thanks it works, not sure how I missed that

You must be logged in to vote
0 replies
Comment options

@gunnartorfis Im thinking about making it the default in next release so that the initial experience is smoother 😄

You must be logged in to vote
0 replies
Comment options

a much needed feature.

You must be logged in to vote
0 replies
Comment options

I'm moving this to discussions because all feature requests will now be under the "Ideas 💡" tab in GitHub discussions.

You must be logged in to vote
1 reply
Comment options

Was this actually released?

Comment options

@okwasniewski (sorry for the ping), I was wondering if the header feature has been released yet? It’s the only thing that’s holding me back from using this library. 🙂

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
enhancement New feature or request Android Apple
Converted from issue

This discussion was converted from issue #104 on December 17, 2024 13:00.

AltStyle によって変換されたページ (->オリジナル) /