@better-captcha/vue
Vue 3 wrappers for CAPTCHA providers that share the same lifecycle, render flow, and control handle so you can swap vendors easily.
4,385
80
| Install | |
|---|---|
npm install @better-captcha/vue |
|
| Latest Version: | 0.8.0 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Oct 23, 2026 |
| Links: | GitHub · npm |
Maintainer: luggapugga
@better-captcha/vue
Vue 3 wrappers for CAPTCHA providers that share the same lifecycle, render flow, and control handle so you can swap vendors without touching your UI.
[!WARNING] This library is in early development and is not production ready yet. Expect breaking API changes while the provider surface stabilises.
Installation
bun install @better-captcha/vue
npm install @better-captcha/vue
Basic usage
<script setup lang="ts">
import { ReCaptcha } from "@better-captcha/vue/provider/recaptcha";
import { ref } from "vue";
const captchaRef = ref();
const onReady = (handle) => {
console.log("Captcha is ready", handle);
};
const onError = (error) => {
console.error("Captcha error:", error);
};
</script>
<template>
<ReCaptcha
ref="captchaRef"
sitekey="your-site-key"
:options="{ theme: 'light' }"
@ready="onReady"
@error="onError"
/>
</template>
Keep the component inside a client-only boundary, access the ref to call execute, and forward the response token to your backend alongside the form submission.
Key ideas
- Unified hook-driven lifecycle that loads provider scripts on demand.
- Shared handle API (
execute,reset,destroy,getResponse) across providers. - Provider-specific bundles such as reCAPTCHA, hCaptcha, Turnstile, and Friendly Captcha.
Related Packages
@rozie-ui/captcha-vue
Idiomatic Vue CAPTCHA — Google reCAPTCHA (v2 + v3), hCaptcha, Cloudflare Turnsti...
1,288
1
vue-cloudflare-turnstile
A Vue 3 component wrapper for Cloudflare Turnstile. User-friendly (re)CAPTCHA al...
4,645
4
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.8.0 | ^3.3.0 | MIT | |
| 0.7.0 | ^3.3.0 | MIT | |
| 0.6.0 | ^3.3.0 | MIT | |
| 0.5.6 | ^3.3.0 | MIT | |
| 0.5.5 | ^3.3.0 | MIT | |
| 0.5.4 | ^3.3.0 | MIT | |
| 0.5.3 | ^3.3.0 | MIT | |
| 0.5.2 | ^3.3.0 | MIT | |
| 0.5.1 | ^3.3.0 | MIT | |
| 0.5.0 | ^3.3.0 | MIT | |
| 0.4.0 | ^3.3.0 | MIT | |
| 0.3.0 | ^3.3.0 | MIT | |
| 0.2.1 | ^3.3.0 | MIT | |
| 0.2.0 | ^3.3.0 | MIT | |
| 0.1.2 | ^3.3.0 | MIT | |
| 0.1.1 | ^3.3.0 | MIT | |
| 0.1.0 | ^3.3.0 | MIT |