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

@mindinventory/react-native-card-animation

Package Overview
Dependencies
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mindinventory/react-native-card-animation

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

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

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

propvaluerequired/optionaldescription
listarrayrequiredList of data which load in FlatList.
startValuenumberoptionalStart value for animation.
startDegreestringoptionalStart point for animate view.
endDegreestringoptionalEnd point for animate view.
perspectiveValuenumberoptionalMax range value to tilt view on scaleX.
durationnumberoptionalAnimation duration
opacityToValnumberoptionalStart value for animate opacity of view.
opacityEndValnumberoptionalEnd value for animate opacity of view.
bounceToValnumberoptionalStart value for animate bounce of view.
bounceEndValnumberoptionalEnd value for animate bounce of view.
backgroundColorstringoptionalIt will apply on flatlist background colour.
spaceBetweennumberoptionalIncrease and decrease the space between list of items.
borderRadiusnumberoptionalCustom border radius can apply on list of items.
shadowRadiusnumberoptionalCustom shadow radius can apply on list of items.
shadowOpacitynumberoptionalCustom shadow opacity can apply on list of items.
onCardPressfunctionoptionalGet callBack data form selected index of flatlist.
renderCardfunctionrequiredRender 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 sales@mindinventory.com and do let us know if you have any questions or suggestion regarding our work.

Keywords

FAQs

Package last updated on 31 Aug 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