react-native-sticky-header-scrollview
Version:
A React Native Expo compatible sticky header scrollview with customizable header, sticky section, body, and pull-to-refresh. Built with Reanimated.
23 lines (22 loc) • 922 B
TypeScript
import React from 'react';
import { StyleProp, ViewStyle } from 'react-native';
export type StickyHeaderScrollViewProps = {
/** The header component rendered at the top and which will scroll away */
header: React.ReactNode;
/** The section that will stick at the top once scrolled past */
sticky: React.ReactNode;
/** The main scrollable body content */
children: React.ReactNode;
/** Style for the header container */
headerStyle?: StyleProp<ViewStyle>;
/** Style for the sticky container */
stickyStyle?: StyleProp<ViewStyle>;
/** Style for the body/content container */
bodyStyle?: StyleProp<ViewStyle>;
/** Optional pull-to-refresh callback */
onRefresh?: () => void;
/** Whether the pull-to-refresh is active */
refreshing?: boolean;
};
declare const StickyHeaderScrollView: React.FC<StickyHeaderScrollViewProps>;
export default StickyHeaderScrollView;