Currently you are viewing v3 document of vue-recaptcha which is still in development

Checkbox v2

Insert reCAPTCHA v2 checkbox

Please click the checkbox
Code
<script setup lang="ts">
const theme = ref<'light' | 'dark'>('light')
const response = ref()
</script>

<template>
  <div>
    <ThemeButton v-model="theme" @click="response = ''" />
    <div>{{ response ? 'Verified' : 'Please click the checkbox' }}</div>
    <Checkbox :key="theme" v-model="response" :theme="theme" />
  </div>
</template>

Props

keytypedefaultdescription
asstring'div'What element to render
theme'light' | 'dark''light'Theme for reCAPTCHA checkbox
size'normal' | 'compact''normal'Size for the reCAPTCHA checkbox

v-model

keytypedescription
modelValuestringThe reCAPTCHA response
widgetIdstringWidget id for reCAPTCHA checkbox

About modelValue

You can set modelValue to null or empty string to reset reCAPTCHA checkbox.