New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-flip-over

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-flip-over

A react component for flipping animation

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
16
128.57%
Maintainers
1
Weekly downloads
 
Created
Source

React Flip Over

A react component for flipping animation.

Usage

Add to your react app

yarn add react-flip-over

Example

Edit react-flip-over demo

class App extends React.Component {
  state = {
    flipped: false
  }

  flip = () => {
    this.setState(state => ({
      flipped: !state.flipped
    }))
  }

  render() {
    const { flipped } = this.state

    return (
      <div className="App">
        <FlipOver flipped={flipped} duration={0.35}>
          <div onClick={this.flip}>
            <h1>Front Click Me</h1>
          </div>
          <div onClick={this.flip}>
            <h1>Back Click Me</h1>
          </div>
        </FlipOver>
      </div>
    )
  }
}

API

FlipOver takes 2 children components, one for front and another one for back.

Optional properties:

  • flipped?: boolean
  • direction?: 'horizontal' | 'vertical'
  • style?: 'default' | 'revolve'
    • Default: flip back and forth
    • Revolve: keep flip to the same direction
  • duration?: number
    • Control flip speed
  • width?: number | string
    • in px or %
  • height?: number | string
    • in px or %

FAQs

Package last updated on 02 Sep 2020

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