Git Product home page Git Product logo

xyztlp / react-native-animated-header-scroll-view Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kanelloc/react-native-animated-header-scroll-view

0.0 0.0 0.0 6.32 MB

React native animated header ScrollView. Animates an image or a custom component into a navbar header.

Home Page: https://www.npmjs.com/package/@kanelloc/react-native-animated-header-scroll-view

License: MIT License

JavaScript 10.55% TypeScript 89.45%

react-native-animated-header-scroll-view's Introduction

React Native Animated Header ScrollView

NPM version npm npm runs with expo

A performant animated ScrollView component that:

  • 🔥Animates an image or a custom component into a navbar header
  • 🔥Supports bounce animation on scroll down
  • 🔥Supports both iOS and Android devices

React Native Animated Header ScrollView

Installation

$ npm install @kanelloc/react-native-animated-header-scroll-view

Usage

import { Card, TopNavBar, HeaderNavBar } from '../components';
import { AnimatedScrollView } from '@kanelloc/react-native-animated-header-scroll-view';
import * as React from 'react';

export const App = () => {
  const data = Array.from(Array(20).keys());
  return (
    <AnimatedScrollView
      HeaderNavbarComponent={<HeaderNavBar />}
      TopNavBarComponent={<TopNavBar />}
      headerImage={require('../../assets/cabin.jpg')}
    >
      {data.map((e) => {
        return <Card item={e} key={e} />;
      })}
    </AnimatedScrollView>
  );
};

You can find a set of detailed examples here

Also a running snack here

Props

Prop name Description Type Required
TopNavBarComponent Rendered on top of the screen as a navbar when scrolling to the top JSX.Element true
HeaderComponent A component to use on top of header image. It can also be used without header image to render a custom component as header. JSX.Element false
HeaderNavbarComponent Rendered on top of the header. Transitions to TopNavbarComponent as you scroll JSX.Element false
headerMaxHeight Height of the header (headerImage or HeaderComponent). Default value is 300 number false
topBarHeight Height of the top navbar. Default value is 90 number false
headerImage Image header source ImageSourcePropType false
disableScale Disables header scaling when scrolling. Default value is false boolean false

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

react-native-animated-header-scroll-view's People

Contributors

dependabot[bot] avatar kanelloc avatar kanelloc-deploy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.