react-native-ok-gesture-password
gesture password component,smooth easy and quick
base on react-native-smart-gesture-password More friendly to existing reactive native versions, adding moving callbacks
Preview
Installation
npm install react-native-ok-gesture-password --save
;;; typeProps = {};<Props> state = point1: "#FFFFFF" point2: "#FFFFFF" point3: "#FFFFFF" point4: "#FFFFFF" point5: "#FFFFFF" point6: "#FFFFFF" point7: "#FFFFFF" point8: "#FFFFFF" point9: "#FFFFFF" ; { return <View style=stylescontainer> <View style=height: 70 marginTop: 10> <View style=stylesheadContent> <View style=stylesheadCircle backgroundColor: thisstatepoint1/> <View style=stylesheadCircle backgroundColor: thisstatepoint2/> <View style=stylesheadCircle backgroundColor: thisstatepoint3/> </View> <View style=stylesheadContent> <View style=stylesheadCircle backgroundColor: thisstatepoint4/> <View style=stylesheadCircle backgroundColor: thisstatepoint5/> <View style=stylesheadCircle backgroundColor: thisstatepoint6/> </View> <View style=stylesheadContent> <View style=stylesheadCircle backgroundColor: thisstatepoint7/> <View style=stylesheadCircle backgroundColor: thisstatepoint8/> <View style=stylesheadCircle backgroundColor: thisstatepoint9/> </View> </View> <OkGesturePassword style=stylesgesturePassword pointBackgroundColor='white' showArrow=false color='#1F67B9' activeColor='#1F67B9' warningColor='red' warningDuration=0 allowCross=false onMove= { console; this; } onFinish= { Alert; this; } /> </View> ; } { this; }; { }; const styles = StyleSheet;
Props
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
pointBackgroundColor | string | Yes | 'transparent' | determine bgcolor of gesture point |
gestureAreaLength | number | Yes | 222 | determine width and height of gesture area |
color | string | Yes | '#A9A9A9' | determine color of normal gesture point |
activeColor | string | Yes | '#00AAEF' | determine color of active gesture point |
warningColor | string | Yes | 'red' | determine color of warning gesture point |
lineColor | string | Yes | determine color of line, if does not set this, the color of line will be the same as gesture point | |
lineWidth | string | Yes | 1 | determine width of line |
warningDuration | number | Yes | 1500 | determine duration when gesture status is warning |
topComponent | element | Yes | determine the presentation above gesture area | |
bottomCompont | element | Yes | determine the presentation below gesture area | |
isWarning | bool | Yes | false | determine gesture warning status |
showArrow | bool | Yes | true | determine whether show arrow in point |
allowCross | bool | Yes | true | determine whether allow a line cross a point |
onStart | func | Yes | determine the listener which is called before gesture is granted | |
onMove | func | Yes | determine the listener which is called after gesture is moved | |
onReset | func | Yes | determine the listener which is called after gesture is reseted | |
onFinish | func | Yes | determine the listener which is called after gesture actions is finished |