apeman-react-flip

1.2.1 • Public • Published

apeman-react-flip

Build Status npm Version JS Standard

Apeman react component for image flip

Installation

$ npm install apeman-react-flip --save

Demo

Live demo is hosted on GitHub Pages.

Demo Image

Usage

'use strict'
 
import React from 'react'
import {ApFlip, ApFlipStyle} from 'apeman-react-flip'
 
const ExampleComponent = React.createClass({
  getInitialState () {
    return {
      focusIndex: 0
    }
  },
  render () {
    return (
      <div>
        <ApFlipStyle />
        <ApFlip images={ [
          'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/01.jpg',
          'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/02.jpg',
          'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/03.jpg',
          'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/04.jpg',
          'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/05.jpg',
          'https://raw.githubusercontent.com/apeman-asset-labo/apeman-asset-images/master/dist/dummy/06.jpg'
        ] }
                focusIndex={ state.focusIndex }
                onFlip={ (amount) => s.setState({ focusIndex: s.state.focusIndex + amount })}
                onClose={ () => s.setState({ focusIndex: -1 })}
        />
        <a onClick={ () => s.setState({ focusIndex: 0 })}> Show Flip</a>
      </div>
    )
  }
})
 

Components

ApFlipStyle

Props

Name Type Default Description

ApFlip

Props

Name Type Default Description

License

This software is released under the MIT License.

Links

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.1
    2
  • 1.2.0
    1
  • 1.1.1
    0
  • 1.1.0
    1

Package Sidebar

Install

npm i apeman-react-flip

Weekly Downloads

3

Version

1.2.1

License

MIT

Last publish

Collaborators

  • okunishinishi