Socket
Socket
Sign inDemoInstall

react-native-stretchable-header

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-stretchable-header

A React Native scrollable stretchable header component


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

license

React Native Stretchable Header

A React Native scrollable stretchable header component. Works on iOS & Android.

Preview

rn-stretchable-header-2.gif

Installation

npm install react-native-stretchable-header --save

Usage

Import StretchableHeader component:

import StretchableHeader from 'react-native-stretchable-header';
<StretchableHeader
  headerImageHeight={350}
  headerImageSource={require('./image.jpg')}
  contentView={renderContentView()}
/>

Configuration

proptype/valid valuesdefaultdescription
headerImageHeightnumber100Height of header image
headerImageSourceImageSourcePropTypenullStretchable header image RN image source
contentViewReactElement100Height of header image

Scrolling Animation

You can use animatedValueScrollY for using the scrolling animation value of content offset Y.

import StretchableHeader, {animatedValueScrollY} from 'react-native-stretchable-header';

With Navigation Bar

For instance, if you want to create navigation bar like preview below:

rn-stretchable-header.gif

You can copy and use TopNavigation from Example. Customize it based on your needs.

Demo Application

This repository contains a demo React Native application with a customizable example of the StretchableHeader component in use.

To use the demo application:

  1. Clone this repository: https://github.com/iqbalansyor/react-native-stretchable-header.git
  2. Navigate to the demo application: cd path/to/this/repository/react-native-stretchable-header/Example
  3. Install demo application dependencies: npm install
  4. For ios, run cd ios && pod install && cd ..
  5. Run npm run start || react-native run-android || react-native run-ios

Contact me

Contributing

Feel free to try it out. Please submit a pull request with any features/fixes for the project.

License

This project is licensed under the MIT License - see the MIT Open Source Initiative for details.

Keywords

FAQs

Last updated on 07 Aug 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc