All Projects → amagitechnologies → react-native-card-animated-modal

amagitechnologies / react-native-card-animated-modal

Licence: other
An animated modal from a card item in a list for React Native.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-card-animated-modal

React Native Web Modal
React Native Modal Implementation for Web
Stars: ✭ 114 (+22.58%)
Mutual labels:  modal, animated
React Native Modal
An enhanced, animated, customizable Modal for React Native.
Stars: ✭ 4,671 (+4922.58%)
Mutual labels:  modal, animated
flip view
A Flutter app with flip animation to view profiles of friends. 🌟
Stars: ✭ 69 (-25.81%)
Mutual labels:  animated
react-spring-bottom-sheet
Accessible ♿️, Delightful ✨, & Fast 🚀
Stars: ✭ 604 (+549.46%)
Mutual labels:  modal
SPLarkController
Custom transition between controllers. Settings controller for your iOS app.
Stars: ✭ 967 (+939.78%)
Mutual labels:  modal
react-native-animated-flatlist
Animated Flatlist for React-Native
Stars: ✭ 56 (-39.78%)
Mutual labels:  animated
modalian
Modalian is a simple react modal component with pleasing features
Stars: ✭ 24 (-74.19%)
Mutual labels:  modal
react-layer-stack
Layering system for React. Useful for popover/modals/tooltip/dnd application
Stars: ✭ 158 (+69.89%)
Mutual labels:  modal
WatermelonMessenger
React Native App using react, redux, sagas, hooks, react navigation v5
Stars: ✭ 63 (-32.26%)
Mutual labels:  animated
react-native-segment-control
Swipeable SegmentedControl component for React Native apps
Stars: ✭ 21 (-77.42%)
Mutual labels:  animated
react-native-modal-loader
Customizable animated modal progress hud for react apps.
Stars: ✭ 36 (-61.29%)
Mutual labels:  modal
MultiModal
Use multiple .sheet, .alert, etc. modifiers in the same SwiftUI View
Stars: ✭ 49 (-47.31%)
Mutual labels:  modal
LSDialogViewController
Custom Dialog for iOS written in Swift
Stars: ✭ 74 (-20.43%)
Mutual labels:  modal
vue-thin-modal
Thin yet powerful modal component of Vue.js
Stars: ✭ 126 (+35.48%)
Mutual labels:  modal
jpopup
Simple lightweight (<2kB) javascript popup modal plugin
Stars: ✭ 27 (-70.97%)
Mutual labels:  modal
bootstrap-modal-ios
Bootstrap Modal for iOS
Stars: ✭ 20 (-78.49%)
Mutual labels:  modal
musicWebTemplate
Free website template built for musicians / artists to promote their music and connect to their audience.
Stars: ✭ 26 (-72.04%)
Mutual labels:  modal
HalfModal
HalfModal mimics the behavior of the drawer of Apple's shortcut application. It is realized using a combination of UIViewPropertyAnimator.
Stars: ✭ 24 (-74.19%)
Mutual labels:  modal
sweet-modal-vue
The sweetest library to happen to modals.
Stars: ✭ 762 (+719.35%)
Mutual labels:  modal
react-native-3d-swiper
A performant, javascript-only 3d swiper for react-native
Stars: ✭ 36 (-61.29%)
Mutual labels:  animated

react-native-card-animated-modal

This component is inspired by the iOS App of the Day cards in App Store. It does not need any native code requirements so it can be used with non-ejected expo projects. The card-modal interaction uses the concept of shared elements.

Features

  • Pure Javascript code.
  • Customizable content rendering per item card.
  • Customizable list component.

Installation

Install the package using npm or yarn.

npm install --save react-native-card-animated-modal
or
yarn add react-native-card-animated-modal

Example Output

Example

Go to example folder and run it locally.

Basic Usage

import CardList from "react-native-card-animated-modal";
import { View, Text } from "react-native";

const now = new Date();
const CARDS = [
  {
    image: {
      uri:
        "http://www.gamespersecond.com/media/2011/07/battlefield-3-poster.jpg"
    },
    height: 300,
    renderItem: ({ item, index }) => (
      <View>
        <Text>Customizable Content</Text>
      </View>
    )
  }
];

const App = () => (
  <CardList
    listProps={{
      ListHeaderComponent: () => (
        <View style={{ padding: 16, paddingBottom: 0 }}>
          <Text
            style={{
              fontSize: 13,
              color: "rgba(0, 0, 0, 0.5)"
            }}
          >
            {now.toDateString()}
          </Text>
          <Text style={{ fontSize: 32, fontWeight: "bold" }}>Featured</Text>
        </View>
      )
    }}
    data={CARDS}
    renderItem={({ item, index }) => {
      /* Render card per item */
      if (item.renderItem) return item.renderItem({ item, index });

      /* Default card when not specified */
      return (
        <View>
          <Text>Default Content</Text>
        </View>
      );
    }}
    renderDetails={({ item, index }) => (
      /* You can also provide custom content per item */
      <View style={{ paddingVertical: 30, paddingHorizontal: 16 }}>
        <Text style={{ color: "rgba(0, 0, 0, 0.7)", fontSize: 18 }}>
          Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
          eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
          minim veniam, quis nostrud exercitation ullamco laboris nisi ut
          aliquip ex ea commodo consequat. Duis aute irure dolor in
          reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
          pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
          culpa qui officia deserunt mollit anim id est laborum.
        </Text>
      </View>
    )}
  />
);

Data Structure Example

[
  {
    // image source for Image component
    image: {
      uri:
        "http://www.gamespersecond.com/media/2011/07/battlefield-3-poster.jpg"
    },
    // Height for the card
    height: 300,
    // Will be used when you want to render different contents per card.
    renderItem: ({ item, index }) => (
      <View>
        <Text>Customizable Content</Text>
      </View>
    )
  }
];

Props

Prop Required Default Description
data optional but should be provided [] Data of the cards to be provided to the list component.
renderItem optional () => null Function that takes ({ item, index }) that will be used to render content of each card.
renderDetails optional () => null Function that takes ({ item, index }) that will be used to render details in the bottom of each card when expanded.
listProps optional {} Props that will be applied to the list component.
cardContainerStyle optional {} Styling property that will be applied to the cards.
detailsContainerStyle optional {} Styling property that will be applied to the details area of the expanded card.
listContainerStyle optional {flexGrow: 1, backgroundColor: "rgb(250, 250, 250)"} Styling property that will be applied to the contentContainerStyle of list component
safeAreaStyle optional { flex: 1 } Styling property that will be applied to the container which is SafeAreaView
cardWidth optional Device Width - 32 The width of the cards.
ListComponent optional FlatList Customizable list component. You can pass here a different component that you want to use for rendering the list.
header optional null Header component that will be rendered at the top of the list
footer optional null Footer component that will be rendered at the bottom of the list

License

MIT © AMAGI

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].