Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@roshangm1/react-native-header-scrollview

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@roshangm1/react-native-header-scrollview

Library for big header like ios

  • 0.5.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

@roshangm1/react-native-header-scrollview

Header ScrollView/FlatList for react native.

Features

  • Typescript
  • Works with Expo
  • Reanimated v2 (on >0.4.0)
  • Flatlist support (with tweaks)

Installation

To use with Animated from react native, use <= 0.4.0

yarn add @roshangm1/react-native-header-scrollview@0.4.0

To use with react-native-reanimated@v2, use >0.4.0 (latest)

Make sure that you have installed React Native Reanimated V2 properly.

yarn add @roshangm1/react-native-header-scrollview

Usage

Scrollview

import HeaderScrollview from '@roshangm1/react-native-header-scrollview';

// ...

return <HeaderScrollview title="Hello">content...</HeaderScrollview>;

Flatlist

  const data = [
    { id: 'header' }, // first index act as a header so always prepend extra item to your data
    { id: 1 },
    { id: 2 },
    { id: 3 },
    { id: 4 },
    { id: 5 },
    { id: 6 },
    { id: 7 },
    { id: 8 },
  ];

return (
  <HeaderScrollview
    title="Hellow world"
    useFlatlist={true}
    flatListProps={{
      data: data,
      keyExtractor: (item) => item.id.toString(),
    }}
    ....
  />
);

Please check example for implementation detail. Or you can refer to this snack from the link below. Note that, this doesn't run in web.

Header Scrollview Example

Props

Only required prop:

PropTypeDescription
titlestringThe title of the header. This will show up as large text inside the scroll view and then fade in as the smaller text inside the header.

From there, you can customize this component to get exactly what you want.

PropTypeDescription
titleStyleReact Native style or ObjectStyles the large header title component inside the scroll view.
containerStyleReact Native style or ObjectStyles the entire container wrapping the header and the scrollview.
headerContainerStyleReact Native style or ObjectStyles the container of the header component that appears after scrolling.
headerComponentContainerStyleReact Native style or ObjectStyles the component inside the header. Anything within this style will fade in and out as the scroll position changes.
headlineStyleReact Native style or ObjectStyles the header text inside the header that appears after scrolling.
scrollContainerStyleReact Native style or ObjectStyles the scroll view component.
useFlatlistStringUse Flatlist instead of ScrollView,
scrollViewPropsObjectPass any extra props to the scrollView.

Contributing

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

License

MIT

This project is the custom fork of this repository which is not maintained now.

Keywords

FAQs

Package last updated on 22 Jul 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc