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.
1. Installation
Section titled 1. Installationnpm install @prosopo/react-procaptcha-wrapper
2. Example of usage
Section titled 2. Example of usage2.1) Basic setup
Section titled 2.1) Basic setupimport {ProcaptchaComponent} from "@prosopo/react-procaptcha-wrapper";
// ...
<ProcaptchaComponent siteKey={"my-site-key"}/>;
2.2) Advanced usage
Section titled 2.2) Advanced usage// ...
<ProcaptchaComponent siteKey={siteKey} language={"en"} callback={(token: string): void => { console.log("verified", token); }} htmlAttributes={{ className: "my-app__procaptcha", style: { maxWidth: "600px", }, }}/>