Skip to content

Commit 8947d4e

Browse files
authored
docs: document how Native Tabs differ from JS Tabs (#61)
1 parent 59408e3 commit 8947d4e

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
["introduction", "quick-start", "how-is-it-different"]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Difference between JS Tabs and Native Tabs
2+
3+
React Navigation already has Bottom Tabs implementation, so you might wonder what's the difference between this project `@react-navigation/bottom-tabs`.
4+
5+
## Main differences
6+
7+
- JS Bottom Tabs recreate the UI as closely as possible while **Native Bottom Tabs use native platform primitives** to create the tabs. This makes your tab navigation indistingushable from Native Apps as they use the same components under the hood.
8+
- Native Bottom Tabs **adapt to interfaces of a given platform** for example: tvOS and visionOS show tabs as a sidebar on iPadOS they appear at the top, while JS Bottom Tabs are always at the bottom.
9+
- Javascript Bottom Tabs have the same apperance on Android and iOS while **Native tabs are using Material's BottomNavigationView on Android and SwiftUI's TabView on Apple platforms**.
10+
11+
## Distinctive features
12+
13+
14+
### Animations handled by the system
15+
16+
Thanks to TabView being native **all tab bar animations are driven by the system** meaning there is less work for the JavaScript thread to handle making the animations smoother.
17+
18+
19+
<video controls width="100%" src="https://github.com/user-attachments/assets/a2835833-9589-4fd6-b760-e73a5025ca4c" />
20+
21+
### Multi platform support
22+
23+
Native Bottom tabs adapt to platform apperance on multiple platforms:
24+
25+
- iOS
26+
- Android
27+
- visionOS
28+
- macOS (coming soon)
29+
- tvOS (coming soon)
30+
31+
### Sidebar Adaptable
32+
33+
TabView can turn in to a side bar on tvOS, iPadOS and macOS. This is controlled by `sidebarAdaptable` prop.
34+
35+
<video controls width="100%" src='https://github.com/user-attachments/assets/4093900f-2996-4c3a-8e15-de5b59aa53cc' />
36+
37+
### Smooth animations between tabs
38+
39+
SwiftUI's TabView offer built-in smooth animations between tabs.
40+
41+
## When to use JS Bottom Tabs
42+
43+
Using native components enforce certain constraints that we need to adapt to.
44+
45+
46+
Here are few cases in which you should use JS Tabs:
47+
48+
- If you want a totally custom tab bar.
49+
- If you need to render custom tab bar items.
50+

docs/docs/docs/getting-started/introduction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
React Native Bottom Tabs is a library that provides a native bottom tabs experience for React Native apps. It uses native platform primitives (SwiftUI's TabView on iOS and BottomNavigationView on Android) to ensure a consistent look and feel across platforms.
44

5-
<iframe width="100%" height="600" src="https://github.com/user-attachments/assets/fbdd9ce2-f4b9-4d0c-bd91-2e62bb422d69" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>
5+
<video controls width="100%" src='https://github.com/user-attachments/assets/fbdd9ce2-f4b9-4d0c-bd91-2e62bb422d69' />
66

77
## Supported Platforms
88
- iOS

0 commit comments

Comments
 (0)