Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alpinejs-form-captcha

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alpinejs-form-captcha

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

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
35
increased by25%
Maintainers
1
Weekly downloads
 
Created
Source

Alpine JS Form Captcha

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

Try it out on CodePen

Example

<form x-data>
  <input type="text" placeholder="Name" />

  <div
    x-form-captcha
    x-form-captcha-img="https://images.unsplash.com/photo-1598894000396-bc30e0996899?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80"
  ></div>

  <button type="submit"> Submit </button>
</form>

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

<script
  defer
  src="https://unpkg.com/alpinejs-form-captcha@latest/dist/captcha.min.js"
></script>

<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>

NPM/Yarn

npm i -D alpinejs-form-captcha

yarn add -D alpinejs-form-captcha

Then you can register the plugin.

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

Alpine.plugin(captcha)

window.Alpine = Alpine

Alpine.start()

Stats

Keywords

FAQs

Package last updated on 04 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc