Animated ScrollView Header for React Native
$ npm install react-native-scrollview-header
or
$ yarn add react-native-scrollview-header
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>
);
}
}
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) |