Vue Integration
Procaptcha provides an official Vue component for easy integration of Prosopo Procaptcha into any Vue project. The integration component supports all the Procaptcha render options.
1. Installation
Section titled 1. Installationnpm install @prosopo/vue-procaptcha-wrapper
2. Example of usage
Section titled 2. Example of usage2.1) Basic setup
Section titled 2.1) Basic setup<script setup lang="ts">import { ProcaptchaComponent } from "@prosopo/vue-procaptcha-wrapper";</script>
<template> <ProcaptchaComponent :siteKey="siteKey" /></template>
<script setup lang="ts">const siteKey = 'my-site-key';</script>
2.2) Advanced usage
Section titled 2.2) Advanced usage// ...
<script setup lang="ts">import { ProcaptchaComponent } from "@prosopo/vue-procaptcha-wrapper";
const siteKey = 'my-site-key';
const callbacks = { onVerified: (token: string) => { console.log("verified", token); },};
const htmlAttributes = { class: "my-app__procaptcha", style: { maxWidth: "600px", },};</script>
<template> <ProcaptchaComponent :siteKey="siteKey" :callbacks="callbacks" :htmlAttributes="htmlAttributes" /></template>