react-shut

2.0.0 • Public • Published

react-shut

npm npm Travis Codecov cdn

easy covering layer that moved by touching. demo

Installation

yarn add react-shut

Usage

import { ShutFromRight as Shut } from 'react-shut'

const mountWithShut = true
const Quit = props => <div onClick={props.fn} />

export default props =>
  <Shut {...{
    mountWithShut,
    Quit,
    onQuitEnd: (e) => {}
  }}>
    {props.children}
  </Shut>

Components

  • ShutFromTop
  • ShutFromBottom
  • ShutFromLeft
  • ShutFromRight

Props

Quit: React$Component

passed { fn } as props. fn() start quit animation.

mountWithShut: boolean

about mounting with shut-animation.

onComeEnd/onQuitEnd: (e) => {}

Their behavior can be confirmed in demo's console.

background: string

duration: number

touchRatio: number

quitRatio: number

notScroll: boolean

License

MIT (http://opensource.org/licenses/MIT)

Readme

Keywords

Package Sidebar

Install

npm i react-shut

Weekly Downloads

6

Version

2.0.0

License

MIT

Last publish

Collaborators

  • kthjm