react-native-expandable-card

1.0.3 • Public • Published

react-native-expandable-card

A react-native expandable and collapsible animated card

Installation

npm install --save react-native-expandable-card

Use

import React from 'react';
import { View } from 'react-native';
import ExpandableCard from 'react-native-expandable-card';
 
const MyComponent = () => {
    return (
        <View>
            <ExpandableCard
                collapsedCardItems={[
                    {label: 'title', value: 'Inception'},
                    {label: 'director', value: 'Christopher Nolan'},
                    {label: 'year', value: 2010}
                ]}
                expandedCardItems={[
                    {label: 'title', value: 'Inception'},
                    {label: 'director', value: 'Christopher Nolan'},
                    {label: 'genre', value: 'science-fiction'}
                    {label: 'year', value: 2010}
                ]}
                style={{backgroundColor: 'lightgrey', marginHorizontal: 20}}
                labelStyle={{fontFamily: 'open-sans-cond-bold'}}
                valueStyle={{fontFamily: 'open-sans-cond'}}
            />
        </View>
    );
};
 
export default MyComponent;

Package Sidebar

Install

npm i react-native-expandable-card

Weekly Downloads

18

Version

1.0.3

License

MIT

Unpacked Size

7.1 kB

Total Files

4

Last publish

Collaborators

  • jonisapp