@latcha/react
v0.1.1
Published
AI-proof CAPTCHA widget for React — drop-in reCAPTCHA replacement
Maintainers
Readme
@latcha/react
AI-proof CAPTCHA for React. Drop-in replacement for reCAPTCHA v2 — no signup, no API key, no backend needed.

Install
npm install @latcha/react
# or
pnpm add @latcha/reactUsage
import { LatchaWidget } from "@latcha/react";
function ContactForm() {
const [verified, setVerified] = useState(false);
return (
<form onSubmit={...}>
<input name="email" type="email" />
<textarea name="message" />
<LatchaWidget onVerify={() => setVerified(true)} />
<button type="submit" disabled={!verified}>Send</button>
</form>
);
}How it works
- User clicks "I'm not a robot"
- A 3×3 grid of AI-generated images loads — human faces are hidden inside some cells
- User selects all cells with a face and clicks Verify
- Answer is checked server-side.
onVerifyfires on success.
No cookies. No tracking. No account required.
Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| onVerify | (token: string) => void | — | Called on success |
| onError | (err: Error) => void | — | Called on network/API failure |
| apiBase | string | "https://latcha.dev/api/latcha" | Override to self-host |
| theme | "light" \| "dark" | "light" | Color scheme |
Links
Made with ❤️ for HackEurope Stockholm
