CapWidget
Cap.JS widget provider for bot protection
About CapWidget
CapWidget is a privacy-focused CAPTCHA solution built on the Cap.JS widget library. It provides a lightweight, client-side CAPTCHA widget for bot protection.
For more information, visit the official Cap.JS documentation.
Showcase
Usage
CapWidget uses an endpoint prop instead of sitekey to specify the API endpoint for the CAPTCHA service.
import { CapWidget } from "@better-captcha/react/provider/cap-widget";
<CapWidget endpoint="https://example.com/api/cap" options={{}} />import { component$ } from "@builder.io/qwik";
import { CapWidget } from "@better-captcha/qwik/provider/cap-widget";
export default component$(() => (
<CapWidget endpoint="https://example.com/api/cap" options={{}} />
));import { CapWidget } from "@better-captcha/solidjs/provider/cap-widget";
<CapWidget endpoint="https://example.com/api/cap" options={{}} /><template>
<CapWidget
endpoint="https://example.com/api/cap"
:options="{}"
/>
</template>
<script setup lang="ts">
import { CapWidget } from "@better-captcha/vue/provider/cap-widget";
</script><script lang="ts">
import CapWidget from "@better-captcha/svelte/provider/cap-widget";
</script>
<CapWidget endpoint="https://example.com/api/cap" options={{}} />import { CapWidget } from "@better-captcha/lit/provider/cap-widget";<cap-widget-captcha endpoint="https://example.com/api/cap"></cap-widget-captcha>Configuration
Provider Options
Prop
Type
Imperative Handle
Prop
Type
CapWidget uses an endpoint prop instead of sitekey to specify the API endpoint for the CAPTCHA service.
Best Practices
- Endpoint Configuration: Ensure your API endpoint is properly configured and accessible
- Client-Side: CapWidget performs client-side verification - ensure proper server-side validation
- Lightweight: Minimal impact on page load times
- Open Source: Benefit from community contributions and transparency
- Customization: Customize the widget appearance to match your application's design