1.2.3 • Published 3 years ago

react-native-header-zoom-scroll v1.2.3

Weekly downloads
-
License
VDT
Repository
github
Last release
3 years ago

react-native-header-zoom-scroll

Easily create ScrollView with Animation zoom header, with lots of customization

Features

  • Smooth animation
  • Custom background header
  • Custom small header
  • Transparent small header

Setup

This library is available on npm, install it with: npm i react-native-header-zoom-scroll or yarn add react-native-header-zoom-scroll.

Usage

import React from 'react';
import type { Node } from 'react';
import {
  SafeAreaView,
  Text,
  Image
} from 'react-native';
import ScrollZoomHeader from 'react-native-header-zoom-scroll';
import { View } from 'react-native';

const App: () => Node = () => {


  return (
    <SafeAreaView >
      <ScrollZoomHeader
        showsVerticalScrollIndicator={false}
        smallHeaderHeight={
          60
        }
        contentSmallHeader={<View style={{
          flex: 1
        }}>
          <Text style={{ color: '#fff', fontWeight: '600', marginLeft: 10 }}>CUSTOM SMALL HEADER</Text>
        </View>}
        headerComponent={
          <View>
            <Text style={{ color: '#fff', fontWeight: '600', marginLeft: 10 }}>CUSTOM  HEADER COMPONENT</Text>

          </View>
        }
        headerHeight={300}
        backgroundHeaderComponent={
          <Image
            source={{ uri: 'https://i.9mobi.vn/cf/images/2015/03/nkk/hinh-dep-12.jpg' }}
            style={{
              width: '100%',
              height: '100%'
            }}
          />
        }
      >
        <Text style={{ fontWeight: '600', marginLeft: 10 }}>CONTENT</Text>

        <View style={{
          height: 1000,
        }} />

      </ScrollZoomHeader>
    </SafeAreaView>
  );
};

export default App;

Available props

NameTypeDefaultDescription
headerComponentJSXAttributenullComponent inside Header
headerHeightnumber0Height of big header
backgroundHeaderComponentJSXAttribute.nullBackground of header Image,View ...
smallHeaderHeightnumber0Height of small header
contentSmallHeaderJSXAttributenullcontent of small header
fadeSmallHeaderboolfalseanimation fade smallHeader when scroll
statusBarBackgroundstringtransparentBackground statusbar
1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago