Big News: Socket Selected for OpenAI's Cybersecurity Grant Program.Details
Socket
Book a DemoSign in
Socket

react-native-collapsing-header

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-collapsing-header

React-Native collapsing header with nativedriver

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
2
-60%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-collapsing-header

Usage

npm install --save react-native-collapsing-header

OR

yarn add react-native-collapsing-header

import CollapsingHeader from 'react-native-collapsing-header';
import Text from 'react-native';

export default class Example extends Component { 

	render() {
		return (
			<CollapsingHeader
            			header={HeaderExample} // required
				scrollEventThrottle={16} // 16 is default value (Optional)
				headerMaxHeight={199} // 199 is default value (Optional)
				headerMinHeight={117} // 117 is default value (Optional)
           		 >
			 	<Text>Your ScrollView body items</Text>
			</CollapsingHeader>
		)
	}

}

// if you want to change the opacity of the header or a part of it while scrolling, just wrap it in an Animated.View (look at the example below)

const HeaderExample = (opacity) => {
	return (
		    <View style={{flex: 1, alignItems: 'center'}}>
				<Animated.View style={{
					opacity
				}}>
					<Text>this text will disappear when scrolling</Text>
				</Animated.View>
				

				<View style={{flexDirection:'row', marginTop: calcSize(15)}}>
					<AIIcon style={styles.viewDatesDropdownPng} image={Pictures.viewDatesDropdownPng} boxSize={8.5}/>
					<AIText fontSize={15}>בחירת תקופת זמן: הכל</AIText>
				</View>
				
			</View>		
	)
}

Keywords

react-native

FAQs

Package last updated on 20 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts