@@ -8,48 +8,47 @@ description: A SectionList that uses React Native Header for better headers.
88Component that extends the [ SectionList] ( https://reactnative.dev/docs/sectionlist ) to add support for
99headers exported from this library.
1010
11- The implementation of this component relies on the [ HeaderComponent] ( /docs/components/section-list-with-headers#headercomponent )
11+ The implementation of this component relies on the [ HeaderComponent] ( /docs/components/section-list-with-headers#headercomponent )
1212and [ LargeHeaderComponent] ( /docs/components/section-list-with-headers#largeheadercomponent ) props.
13- The [ HeaderComponent] ( /docs/components/section-list-with-headers#headercomponent ) is rendered above
14- the SectionList and the [ LargeHeaderComponent] ( /docs/components/section-list-with-headers#largeheadercomponent )
15- is rendered as the ` ListHeaderComponent ` of the SectionList. Using these two props will allow for
13+ The [ HeaderComponent] ( /docs/components/section-list-with-headers#headercomponent ) is rendered above
14+ the SectionList and the [ LargeHeaderComponent] ( /docs/components/section-list-with-headers#largeheadercomponent )
15+ is rendered as the ` ListHeaderComponent ` of the SectionList. Using these two props will allow for
1616animations/built-in features in this library to work properly.
1717
1818## Props
1919
20- This component uses the SectionList under the hood, which inherits [ all of the props
21- from the SectionList] ( https://reactnative.dev/docs/sectionlist ) component.
20+ This component uses the SectionList under the hood, which inherits [ all of the props
21+ from the SectionList] ( https://reactnative.dev/docs/sectionlist ) component.
2222
2323### HeaderComponent
2424
2525The component to render above the SectionList. This accepts a function that returns a React Element
2626to display as the header. The function will be called with the following arguments:
2727
2828- ` showNavBar ` : An animated value that will be 0 when the header's subcomponents should be hidden
29- and 1 when they should be shown. This is useful for animating the header's subcomponents. The
30- [ Header] ( /docs/components/header ) component uses this value to animate its left, center, and
29+ and 1 when they should be shown. This is useful for animating the header's subcomponents. The
30+ [ Header] ( /docs/components/header ) component uses this value to animate its left, center, and
3131 right children.
3232
3333### LargeHeaderComponent
3434
35- An optional component to render as the large header for this component. This accepts a function
35+ An optional component to render as the large header for this component. This accepts a function
3636that returns a React Element to display as the large header. The function will be called with the
3737following arguments:
3838
3939- ` scrollY ` : An animated value that keeps track of the current scroll position of the SectionList.
40- This prop is useful for creating custom animations on the large header. In our [ example] ( /docs/example ) ,
41- we use the [ ScalingView] ( /docs/components/scaling-view ) component to scale the large header
40+ This prop is useful for creating custom animations on the large header. In our [ example] ( /docs/example ) ,
41+ we use the [ ScalingView] ( /docs/components/scaling-view ) component to scale the large header
4242 when the user pulls down on the SectionList (to mimic native iOS behaviour).
43-
4443- ` showNavBar ` : An animated value that keeps track of whether or not the small header is hidden.
4544 This prop is useful if you want to create your own custom animations based on whether or not the
4645 small header is hidden.
4746
4847### ignoreLeftSafeArea
4948
50- An optional boolean that determines whether or not to ignore the left safe area. Defaults to
51- ` false ` . The safe area adjustments are used to make sure that the scroll container does not
52- overlap with the notch/headers on different phones - leave this prop as false if you want to
49+ An optional boolean that determines whether or not to ignore the left safe area. Defaults to
50+ ` false ` . The safe area adjustments are used to make sure that the scroll container does not
51+ overlap with the notch/headers on different phones - leave this prop as false if you want to
5352respect those safe areas.
5453
5554### ignoreRightSafeArea
@@ -61,7 +60,7 @@ respect those safe areas.
6160
6261### disableAutoFixScroll
6362
64- An optional to disable the auto fix scroll mechanism. This is useful if you want to disable the
63+ An optional to disable the auto fix scroll mechanism. This is useful if you want to disable the
6564auto scroll when the large header is partially visible. Defaults to ` false ` .
6665
6766### containerStyle
@@ -74,11 +73,22 @@ An optional style object that will be applied to the large header container.
7473
7574### largeHeaderShown
7675
77- An optional animated [ Shared Value] ( https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/shared-values/ )
78- that will be mutated by the library when the large header is shown or hidden. This is useful if you
76+ An optional animated [ Shared Value] ( https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/shared-values/ )
77+ that will be mutated by the library when the large header is shown or hidden. This is useful if you
7978would like to track when the large header is shown or hidden.
8079
8180### onLargeHeaderLayout
8281
8382An optional callback that will be called when the large header is laid out. This is useful if you
8483want to access the layout of the large header to calculate the height of the large header.
84+
85+ ### absoluteHeader
86+
87+ This property controls whether or not the header component is absolutely positioned. This is useful
88+ if you want to render a header component that allows for transparency.
89+
90+ ### initialAbsoluteHeaderHeight
91+
92+ This property is used when ` absoluteHeader ` is true. This is the initial height of the
93+ absolute header. Since the header's height is computed on its layout event, this is used
94+ to set the initial height of the header so that it doesn't jump when it is initially rendered.
0 commit comments