Salta ai contenuti

Integrazione React

Procaptcha fornisce un componente ufficiale React per una facile integrazione di Prosopo Procaptcha in qualsiasi progetto React. Il componente di integrazione supporta tutte le opzioni di rendering Procaptcha.

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",
},
}}
/>