npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@wasiquehaider/react-native-animated-scroll

v0.0.2

Published

A package that provides a customizable and animated header component with scrollable content for React Native applications.

Downloads

1

Readme

npm version Platform - Android and iOS License: MIT format prettier lint-eslint

@wasiquehaider/react-native-animated-scroll is a customizable and animated header component for React Native applications. It enhances user experience by providing a header that smoothly animates and hides as the user scrolls through the content. Leveraging react-native-reanimated for high-performance animations, this package includes features such as dynamic scaling, opacity transitions, and responsive design adjustments.

Features

  • Smooth Animations: Fluid animations for header transitions based on scroll position.
  • Customizable: Easily customize the header with different titles, buttons, and styles.
  • Responsive: Compatible with various screen sizes and safe areas.
  • Easy Integration: Simple API for integrating into existing React Native projects

Installation

Install the package using npm or yarn:

npm install @wasiquehaider/react-native-animated-scroll

or

yarn add @wasiquehaider/react-native-animated-scroll

Usage

import React from "react";
import { View } from "react-native";
import AnimatedScroll from "@wasiquehaider/react-native-animated-scroll/index";

const YourContentComponent = () => (
  <View>
    <Text>Your main content goes here...</Text>
  </View>
);

const LeftButton = () => <Text>Left</Text>;

const RightButton = () => <Text>Right</Text>;

const App = () => (
  <View style={{ flex: 1 }}>
    <AnimatedScroll
      title="Welcome"
      content={<YourContentComponent />}
      leftContent={<LeftButton />}
      rightContent={<RightButton />}
      onLeftPress={() => console.log("Left button pressed")}
      onRightPress={() => console.log("Right button pressed")}
      imageUri={{ uri: "https://example.com/image.jpg" }}
    />
  </View>
);

export default App;

Props

AnimatedScrollProps

| Key | Type | Description | | ---------------- | --------------- | ----------------------------------------------------------------- | | title | String | The title text displayed in the header. | | content | ReactNode | The main content to display in the ScrollView. | | leftContent | ReactNode | Custom content for the left side of the header (e.g., a button). | | rightContent | ReactNode | Custom content for the right side of the header (e.g., a button). | | leftBtnStyles | Object | Styles for the left button. | | rightBtnStyles | Object | Styles for the right button. | | onLeftPress | Function | Function to call when the left button is pressed. | | onRightPress | Function | Function to call when the right button is pressed. | | imageUri | string ? number | URI for an optional image displayed at the top of the ScrollView. |

Example

import React from "react";
import { View } from "react-native";
import AnimatedScroll from "@wasiquehaider/react-native-animated-scroll/index";

const YourContentComponent = () => (
  <View>
    <Text>Your main content goes here...</Text>
  </View>
);

const LeftButton = () => <Text>Left</Text>;

const RightButton = () => <Text>Right</Text>;

const App = () => (
  <View style={{ flex: 1 }}>
    <AnimatedScroll
      title="Welcome"
      content={<YourContentComponent />}
      leftContent={<LeftButton />}
      rightContent={<RightButton />}
      onLeftPress={() => console.log("Left button pressed")}
      onRightPress={() => console.log("Right button pressed")}
      imageUri={{ uri: "https://example.com/image.jpg" }}
    />
  </View>
);

export default App;

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT