Skip to content

React Integration

Procaptcha provides an official React component for easy integration of Prosopo Procaptcha into any React project. The integration component supports all the Procaptcha render options.

npm install @prosopo/react-procaptcha-wrapper

import {ProcaptchaComponent} from "@prosopo/react-procaptcha-wrapper";
// ...
<ProcaptchaComponent siteKey={"my-site-key"}/>;
// ...
<ProcaptchaComponent
siteKey={siteKey}
language={"en"}
callback={(token: string): void => {
console.log("verified", token);
}}
htmlAttributes={{
className: "my-app__procaptcha",
style: {
maxWidth: "600px",
},
}}
/>