rn-agmcaptchalite
v0.1.4
Published
A simple package for captcha in react-native
Maintainers
Readme
React Native AGM Captcha Lite
A simple and customizable Captcha provider for React Native.
Installation
Install the package using npm:
npm install rn-agmcaptchalite
USAGE
import React, { useRef } from 'react';
import { Button } from 'react-native';
import {Captcha} from 'rn-agmcaptchalite';
const YourComponent = () => {
const captchaRef = useRef(null);
const captchaHandle = () => {
const captchaResult = captchaRef.current.captchaChecking();
console.log(captchaResult)
// If the user enters the correct captcha, captchaResult is true; otherwise, false
};
return (
<Captcha
ref={captchaRef}
>
</Captcha>
<Button title = 'click' onPress={captchaHandle}/>
);
};
export default YourComponent;
| Prop | Type | Description |
|---------------------------|-----------------|------------------------------------------------------------------|
| inputStyle | TextStyle | Customize the style of the input field. |
| containerStyle | ViewStyle | Customize the style of the component container. |
| captchaContainerStyle | ViewStyle | Customize the style of the captcha container. |
| refreshButtonStyle | ViewStyle | Customize the style of the refresh button. |
| addSpecialCharacter | boolean | Set to false to exclude special characters (default is true).|
| captchaLength | number | Choose the length of the captcha (default is 5). |
| refreshIcon | React.ReactNode | Custom refresh icon component. |
| captchaTimeout | number | set captcha timeout time |
| timeOutActive | boolean | if you want time out feature, make it true , (default is false)|
