An open API service indexing awesome lists of open source software.

https://github.com/mrnkr/react-native-expo-headers

A compilation of header components for React Native with Expo
https://github.com/mrnkr/react-native-expo-headers

headers human-interface-design material-design mobile-app plugin react react-native

Last synced: 3 months ago
JSON representation

A compilation of header components for React Native with Expo

Awesome Lists containing this project

README

          

# React Native Headers

## Nice looking headers for React Native

### Intro

Just a compilation of header components I have made since I started working on React Native :)

### Quick Start

```javascript
const { scrollY } = this.state;

{Platform.OS === "ios" ?
,
onPress: () => console.log("Pressed the left button!")
}}
rightButton={{
icon: ,
onPress: () => console.log("Pressed the right button!")
}} /> : null}

{Platform.OS === "ios" ?
,
onPress: () => console.log("Pressed the left button!")
}}
rightButton={{
icon: ,
onPress: () => console.log("Pressed the right button!")
}} /> : null}

{Platform.OS === 'android' ?
, onPress: () => console.log('Menu') }}
rightButtons={[{ icon: , onPress: () => console.log("Filter"), showAsAction: 'ifRoom' },
{ icon: , onPress: () => console.log("Share!"), showAsAction: 'ifRoom' },
{ icon: , title: 'Give the man a beer!', onPress: () => console.log('Sure! He will get his beer!'), showAsAction: 'never' },
{ icon: , title: 'Bowtie?', onPress: () => console.log('Bowties are cool!'), showAsAction: 'never' }]} /> : null}

{Platform.OS === "android" ?
, onPress: () => console.log('Menu') }}
rightButtons={[{ icon: , onPress: () => console.log("Filter"), showAsAction: 'ifRoom' },
{ icon: , onPress: () => console.log("Share!"), showAsAction: 'ifRoom' },
{ icon: , title: 'Give the man a beer!', onPress: () => console.log('Sure! He will get his beer!'), showAsAction: 'never' },
{ icon: , title: 'Bowtie?', onPress: () => console.log('Bowties are cool!'), showAsAction: 'never' }]} /> : null}
```

For `zIndex` is not supported on Android, always position Android headers below all the rest of the Component code in order for it to show on top of it all.
Also, remember all these are absolutely positioned, just in case.