对于 React Native(iOS/Android)而言,具有翻转动作的卡组件
The card component which have motion of flip for React Native(iOS/Android)
npm i react-native-flip-cardimport FlipCard from 'react-native-flip-card'
{/* Face Side */}
The Face
{/* Back Side */}
The Back
{console.log('isFlipEnd', isFlipEnd)}}
>
{/* Face Side */}
The Face
{/* Back Side */}
The Back
Default: falseIf you change default display side, you can set true to this param. If you change side, you can pass bool variable dynamically.
Default: trueIf you want to disable click a card, you can set false to this param.
Default: 6The friction of card animation
Default: 0The amount of perspective applied to the flip transformation
Default: falseIf you set true, a card flip to horizontal.
Default: trueIf you set false, a card not flip to vertical. If you set true both flipHorizontal and flipVertical , a card flip to diagonal.
| vertical | diagnoal |
|---|---|
(isFlipStart) => {}When a card starts a flip animation, call onFlipEnd function with param.
(isFlipEnd) => {}When a card finishes a flip animation, call onFlipEnd function with param.
Default:falseIf you pass true to alignHeight param, the card keep height of bigger side.
Default:falseIf you pass true to alignWidth param, the card keep width of bigger side.
Default:falseIf you pass true to useNativeDriver param, the card animation will utilize the native driver.
Inspired by react-flipcard
MIT
暂无开放 Issues,或尚未同步最近议题。