1.1.5 • Published 7 years ago

react-card-flippable v1.1.5

Weekly downloads
67
License
ISC
Repository
github
Last release
7 years ago

React Card Flippable

Installation

npm install react-card-flippable --save

Basic Usage

import React, {Component} from 'react';
import CardFlippable from 'react-card-flippable';

class App extends Component {

    render() {

        const title = "Today News";
        const description = "Today is nice weather in Abu Dhabi";
        const thumbnailUrl = "http://oi65.tinypic.com/28unxug.jpg";
        const backContent = <div><h3>Click to flip back</h3></div>;

        return (
            <div>
                <CardFlippable title={title} description={description} thumbnailUrl={thumbnailUrl} backContent={backContent} />
            </div>
        );
    }
}

See the demo here

Or you might wanna replace the whole front end content.

import React, {Component} from 'react';
import CardFlippable from 'react-card-flippable';

class App extends Component {

    render() {

        const frontContent = <div><h3>Front content goes here</h3></div>;
        const backContent = <div><h3>Back content goes here</h3></div>;

        return (
            <div>
                <CardFlippable frontContent={frontContent} backContent={backContent} />
            </div>
        );
    }
}

Properties

PropsTypeDescription
titlestringTitle of the card
descriptionstringDescription to be displayed under the card
thumbnailUrlstringUrl to the image of the card
disableFlipbooleanSetting it to true disables the flip of card on click
frontContentobjectJSX content to be rendered on card front. Note: using this prop will replace the default card behavior
backContentobjectJSX content to be rendered on the back of the card
1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago