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
Copy file name to clipboardExpand all lines: docs/docs/03-api-reference/components/04-header.mdx
+40-5Lines changed: 40 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,8 @@ slug: /components/header
5
5
description: A header navigation component exported from React Native Header.
6
6
---
7
7
8
-
Headers are navigation components that display information and actions relating to the current
9
-
screen. This component is exported in this library and works well with the other scroll
8
+
Headers are navigation components that display information and actions relating to the current
9
+
screen. This component is exported in this library and works well with the other scroll
10
10
containers this library provides.
11
11
12
12
## Props
@@ -61,8 +61,8 @@ An optional boolean to indicate whether the header's center container should fad
61
61
### ignoreTopSafeArea
62
62
63
63
An optional boolean to indicate whether the header should ignore the top safe area. This is useful
64
-
when you want to display the header behind the status bar. Defaults to `false`. If you are
65
-
rendering this header in an iOS [modal](https://reactnavigation.org/docs/native-stack-navigator/#presentation),
64
+
when you want to display the header behind the status bar. Defaults to `false`. If you are
65
+
rendering this header in an iOS [modal](https://reactnavigation.org/docs/native-stack-navigator/#presentation),
66
66
you should set this to `true`.
67
67
68
68
### noBottomBorder
@@ -76,4 +76,39 @@ An optional color to use for the header's bottom border. Defaults to `#E5E5E5`.
76
76
77
77
### borderWidth
78
78
79
-
An optional width to use for the header's bottom border. Defaults to [StyleSheet.hairlineWidth](https://reactnative.dev/docs/stylesheet#hairlinewidth).
79
+
An optional width to use for the header's bottom border. Defaults to [StyleSheet.hairlineWidth](https://reactnative.dev/docs/stylesheet#hairlinewidth).
80
+
81
+
### SurfaceComponent
82
+
83
+
An optional component that can act as the surface of the header. Please ensure that the styling applied to the component includes `StyleSheet.absoluteFill` or `StyleSheet.absoluteFillObject` to ensure that the surface component fills the header.
84
+
85
+
#### Example
86
+
87
+
The following example will make the header have a **cyan** background when the user scrolls the scroll container up:
0 commit comments