react-native-scrollview-header
v1.0.6
Published
An Animated ScrollView Header for React Native
Downloads
4
Readme
React Native ScrollView Header
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) |