An open API service indexing awesome lists of open source software.

https://github.com/markmead/alpinejs-form-captcha

Prevent your forms getting unwanted submissions through the use of an image puzzle ✅
https://github.com/markmead/alpinejs-form-captcha

alpine-js alpinejs alpinejs-plugin captcha form-captcha form-validation javascript-captcha javascript-validation validation

Last synced: 4 months ago
JSON representation

Prevent your forms getting unwanted submissions through the use of an image puzzle ✅

Awesome Lists containing this project

README

        

# Alpine JS Form Captcha

Prevent your forms getting unwanted submissions through the use of an image
puzzle ✅

### [Try it out on CodePen](https://codepen.io/markmead/full/abYpZbj)

## Example

```html

Submit

```

### Bot Prevention

There is logic in place to stop one click answers, meaning there shouldn't be a
time where the answer is one click away.

### Styling

In the `x-form-captcha-img` is where you can pass the URL for the image you want
displayed.

The HTML that is generated hsa the following classes:

- `fvWrapper`
- `fvImg`
- `fvActions`
- `fvPrev`
- `fvNext`

### Modifiers

You can pass a rotation degrees with `x-form-captcha.30` where `30` is the
degrees you want.

## Install

It's very easy to install Alpine JS plugins! 🙌

### CDN

```html

```

### NPM/Yarn

```shell
npm i -D alpinejs-form-captcha

yarn add -D alpinejs-form-captcha
```

Then you can register the plugin.

```js
import Alpine from 'alpinejs'
import captcha from 'alpinejs-form-captcha'

Alpine.plugin(captcha)

window.Alpine = Alpine

Alpine.start()
```

### Stats

![](https://img.shields.io/bundlephobia/min/alpinejs-form-captcha)
![](https://img.shields.io/npm/v/alpinejs-form-captcha)
![](https://img.shields.io/npm/dt/alpinejs-form-captcha)
![](https://img.shields.io/github/license/markmead/alpinejs-form-captcha)