New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-flip-component

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-flip-component

Double-sided React component that flips 180 degrees

1.0.4
Source
npm
Version published
Weekly downloads
33
94.12%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-flip-component

Installation

npm install react-native-flip-component --save

Instructions

Pass a boolean, front component, and back component as props. The boolean will determine if the front or back component should be displayed.

Demo

GIF coming soon...

Props

NameRequired?Description
isFlippedtrueboolean
frontViewtrueComponent
backViewtrueComponent
scalefalsedefaults to 0.8
scaleDurationfalsedefaults to 100
frontPerspectivefalsedefaults to 1000
backPerspectivefalsedefaults to 1000
rotateDurationfalsedefaults to 300
containerStylesfalsedefaults to { flex: 1 }
frontStylesfalsedefaults to null
backStylesfalsedefaults to null

Example

import React, { Component } from 'react';
import FlipComponent from 'react-native-flip-component';
import { View, Button, Text } from 'react-native';

class Example extends Component {
  constructor(props) {
    super(props);
    this.state = {
      isFlipped: false;
    };
  }
  render() {
    <View>
      <FlipComponent
        isFlipped={this.state.isFlipped}
        frontView={
          <View>
            <Text style={{ textAlign: 'center' }}>Front Side</Text>
          </View>
        }
        backView={
          <View>
            <Text style={{ textAlign: 'center' }}>Back Side</Text>
          </View>
        }
      />
      <Button
        onPress={() => this.setState({ isFlipped: !this.state.isFlipped })}
        title="Flip"
      />
    </View>
  }
}

Keywords

react-native

FAQs

Package last updated on 01 Mar 2018

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