gotcha-slider-captcha
v1.6.1
Published
This is a slider captcha component made using react. This componnet have three main elements: The check-box to create/generate, the image with the sliding puzzle piece and the slider below to slide the puzzle piece.
Downloads
54
Maintainers
Readme
User Guide
This is a slider captcha component made using React. This componnet have three main elements: The check-box to create/generate, the image with the sliding puzzle piece and the slider below to slide the puzzle piece.
Requirements
This package is compatible with version 18.2.0 of React
Commands
To install this component, use:
npm i gotcha-silder-captcha
How to use the Buttom component:
- Import in your project:
import SliderCaptcha from "gotcha-slider-captcha/dist/slider-captcha";
- Use this if you want to add any logic based on the slider verification token:
const [captchaTokenVerify, setCaptchaTokenVerify] = useState(false);
const verifiedCallback = (token) => {
console.log("Slider Captcha Token: " + token);
if (token) {
setCaptchaTokenVerify(true);
}
};
- Add slider captcha in your component:
<SliderCaptcha
create="http://your_api/v1/captcha/create"
verify="http://your_api/v1/captcha/verify"
callback={verifiedCallback}
/>