You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A component library containing the UI elements and helpers used in React Navigation. It can be useful if you're building your own navigator, or want to reuse a default functionality in your app.
8
11
9
12
## Installation
@@ -41,6 +44,29 @@ Whether header title font should scale to respect Text Size accessibility settin
41
44
42
45
Function which returns a React Element to display on the left side of the header. You can use it to implement your custom left button, for example:
43
46
47
+
<TabsgroupId="config"queryString="config">
48
+
<TabItemvalue="static"label="Static"default>
49
+
50
+
```js
51
+
constRootStack=createNativeStackNavigator({
52
+
screens: {
53
+
Home: {
54
+
screen: HomeScreen,
55
+
options: {
56
+
headerLeft: (props) => (
57
+
<MyButton {...props} onPress={() => {
58
+
// Do something
59
+
}}>
60
+
)
61
+
}
62
+
}
63
+
}
64
+
})
65
+
```
66
+
67
+
</TabItem>
68
+
<TabItemvalue="dynamic"label="Dynamic"default>
69
+
44
70
```js
45
71
<Stack.Screen
46
72
name="Home"
@@ -58,6 +84,9 @@ Function which returns a React Element to display on the left side of the header
58
84
/>
59
85
```
60
86
87
+
</TabItem>
88
+
</Tabs>
89
+
61
90
#### `headerRight`
62
91
63
92
Function which returns a React Element to display on the right side of the header.
@@ -132,25 +161,139 @@ Function which returns a React Element to render as the background of the header
132
161
133
162
For example, you can use this with `headerTransparent` to render a blur view to create a translucent header.
Extra padding to add at the top of header to account for translucent status bar. By default, it uses the top value from the safe area insets of the device. Pass 0 or a custom value to disable the default behavior, and customize the height.
0 commit comments