Skip to content

weifxn/react-native-scrollview-header

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native ScrollView Header

npm (scoped)

Animated ScrollView Header for React Native

Installation

$ npm install react-native-scrollview-header

or

$ yarn add react-native-scrollview-header

Usage

import React from 'react'
import { View } from 'react-native'
import Header from 'react-native-scrollview-header';

class Component extends React.Component {
	render() {
		const data = [{ name: 'Pink Floyd', age: '30' }];

		return (
			<Header title="Names" barStyle={{ backgroundColor: 'grey' }}>
				{data.map(item => (
					<Text> {item.name} </Text>
				))}
			</Header>
		);
	}
}

Props

Prop Default Type Description
title undefined string Title for header
titleStyle undefined object Styles for header title
headerStyle undefined object Styles for title container
barStyle undefined object Styles for header bar
maxHeight 130 number Maximum height of header (animated)
minHeight 95 number Minimum height of header (animated)
extras undefined object Extra items above title (icon)

About

An Animated ScrollView Header for React Native

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published