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

@mindinventory/react-native-card-animation

v1.0.4

Published

Beautiful Flatlist with OnScroll and OnClick animation.By using this, user can easily animate their flatlist, they can customise animation’s direction, duration, opacity with different colors. They can customise view by their own and integrate into flatli

Downloads

5

Readme

Description

Beautiful Flatlist with OnScroll and OnClick animation. By using this, user can easily animate their flatlist, they can customise animation’s direction, duration, opacity with different colors. They can customise view by their own and integrate into flatlist.

Installation

using npm:

npm install @mindinventory/react-native-card-animation

using yarn:

yarn add @mindinventory/react-native-card-animation

Supported platform

  • iOS
  • Android

Dependencies

  • react-native-reanimated

Usage

// User Data to load in List

const alarmData = [
  {
    id: Math.random(),
    title: 'Hi..',
    time: '06:00 AM',
    bgColor: BLUE,
  },
  {
    id: Math.random(),
    title: 'Hello...',
    time: '06:30 AM',
    bgColor: LIGHT_GREEN,
  },
  {
    id: Math.random(),
    title: 'Hey Wake Up',
    time: '07:00 AM',
    bgColor: YELLOW,
  },
  {
    id: Math.random(),
    title: "It's Morning...",
    time: '08:00 AM',
    bgColor: SKIN,
  },
  {
    id: Math.random(),
    title: 'Have a Breakfast...',
    time: '10:30 AM',
    bgColor: SKYBLUE,
  },
  {
    id: Math.random(),
    title: 'Get ready to go out...',
    time: '11:00 AM',
    bgColor: PURPAL,
  },
  {
    id: Math.random(),
    title: 'Have a great day...',
    time: '11:30 AM',
    bgColor: LIGHT_BLUE,
  },
];

// OnScroll Card Animation Values

const startValue = 100;
const startDegree = '0deg';
const endDegree = '5deg';
const perspectiveValue = 100;

// OnPress Card Animation Values

const duration = 500;
const opacityToVal = 0.5;
const opacityEndVal = 1;
const bounceToVal = 1.1;
const bounceEndVal = 1;
const bgColor = “#1a212f”;
const spaceBetween = -25;
const borderRadius = 25;
const shadowRadius = 10;
const shadowOpacity = 1;

// Implementation of  CardAnimation Component 

<CardAnimation
  list={DATA}
  startValue={startValue}
  startDegree={startDegree}
  endDegree={endDegree}
  perspectiveValue={perspectiveValue}
  duration={duration}
  opacityToVal={opacityToVal}
  opacityEndVal={opacityEndVal}
  bounceToVal={bounceToVal}
  bounceEndVal={bounceEndVal}
  backgroundColor={bgColor}
  spaceBetween={spaceBetween}
  borderRadius={borderRadius}
  shadowRadius={shadowRadius}
  shadowOpacity={shadowOpacity}
  onCardPress={item => {alert(`You have pressed : ${item.time}`)}}
  renderCard={item => <CustomCardView item={item} />}
/>

Component props

| prop | value | required/optional | description | | ------ | ------ | ------ | ------ | | list | array | required | List of data which load in FlatList. | | startValue | number | optional | Start value for animation. | | startDegree | string | optional | Start point for animate view. | | endDegree | string | optional | End point for animate view. | | perspectiveValue | number | optional | Max range value to tilt view on scaleX. | | duration | number | optional | Animation duration | | opacityToVal | number | optional | Start value for animate opacity of view. | | opacityEndVal | number | optional | End value for animate opacity of view. | | bounceToVal | number | optional | Start value for animate bounce of view. | | bounceEndVal | number | optional | End value for animate bounce of view. | | backgroundColor | string | optional | It will apply on flatlist background colour. | | spaceBetween | number | optional | Increase and decrease the space between list of items. | | borderRadius | number | optional | Custom border radius can apply on list of items. | | shadowRadius | number | optional | Custom shadow radius can apply on list of items. | | shadowOpacity | number | optional | Custom shadow opacity can apply on list of items. | | onCardPress | function | optional | Get callBack data form selected index of flatlist. | | renderCard | function | required | Render custom component in flatlist created by user. |

LICENSE!

React-native-card-animation is MIT-licensed.

Let us know!

We would be really happy if you send us links of your projects where you use our component. Just send an email to [email protected] and do let us know if you have any questions or suggestion regarding our work.