Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
@krmao/react-native-captcha
Advanced tools
Readme
yarn add @krmao/react-native-captcha
yarn add react-native-gesture-handler
yarn add react-native-reanimated
yarn add react-native-get-random-values
yarn add crypto-js
import Captcha from '@krmao/react-native-captcha';
export default function App() {
return (
<SafeAreaView style={styles.root}>
<ScrollView style={styles.scrollView} contentContainerStyle={styles.scrollViewContainer}>
<StatusBar translucent={true} backgroundColor={'#0000ff33'} barStyle={'dark-content'} />
</ScrollView>
<Captcha />
</SafeAreaView>
);
}
export interface CaptchaProps {
/**
* 禁用滑块滑动, default false
*/
disableSlider?: boolean;
localBubbleBehindType?: LocalBubbleBehindType;
/**
* 校验的误差范围内算成功 default 3
*/
maxOffset?: number;
/**
* 滑块尺寸 default 38
*/
thumbSize?: number;
/**
* 弹窗尺寸 default 49
*/
bubbleSize?: number;
/**
* 底图宽度 default 292
*/
imageWidth?: number;
/**
* 底图高度 default 145
*/
imageHeight?: number;
verifyLocal?: (
sliderCurrentProgress: number,
randomBubbleXProgress: number,
maxOffset: number,
events: PanGestureHandlerEventPayload[],
touchTime: number | undefined
) => boolean;
verifyRemote?: (
isVerifyLocalSuccess: boolean,
slideValue: number,
maxOffset: number,
events: PanGestureHandlerEventPayload[],
touchTime: number | undefined
) => Promise<boolean>;
/**
* sliding start
*/
onSlidingStart?: () => void;
onSlidingTouchBegin?: () => void;
/**
* on refresh clicked
*/
onRefreshClicked?: () => void;
onSlidingComplete?: () => void;
/**
* replace the all background image sources
*/
imageBackgroundSources?: ImageSourcePropType[];
/**
* replace the all bubble image sources
*/
imageBubbleSources?: BubbleSource[];
/**
* replace the refresh image sources
*/
imageRefreshSource?: ImageSourcePropType;
/**
* 向右滑动滑块解锁拼图
*/
defaultSliderText?: string;
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
FAQs
@krmao/react-native-captcha
The npm package @krmao/react-native-captcha receives a total of 6 weekly downloads. As such, @krmao/react-native-captcha popularity was classified as not popular.
We found that @krmao/react-native-captcha demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.