# 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:

```bash
npm i gotcha-silder-captcha
```

## How to use the Buttom component:

1. Import in your project:

```bash
import SliderCaptcha from "gotcha-slider-captcha/dist/slider-captcha";
```

2. Use this if you want to add any logic based on the slider verification token:

```bash
const [captchaTokenVerify, setCaptchaTokenVerify] = useState(false);

const verifiedCallback = (token) => {
  console.log("Slider Captcha Token: " + token);
  if (token) {
    setCaptchaTokenVerify(true);
  }
};
```

3. Add slider captcha in your component:

```bash
<SliderCaptcha
  create="http://your_api/v1/captcha/create"
  verify="http://your_api/v1/captcha/verify"
  callback={verifiedCallback}
/>
```
