gotcha-slider-captcha

1.6.1 • Public • Published

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:

  1. Import in your project:
import SliderCaptcha from "gotcha-slider-captcha/dist/slider-captcha";
  1. 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);
  }
};
  1. Add slider captcha in your component:
<SliderCaptcha
  create="http://your_api/v1/captcha/create"
  verify="http://your_api/v1/captcha/verify"
  callback={verifiedCallback}
/>

Package Sidebar

Install

npm i gotcha-slider-captcha

Weekly Downloads

12

Version

1.6.1

License

ISC

Unpacked Size

140 kB

Total Files

55

Last publish

Collaborators

  • argon_react