JSPM

@trustcomponent/trustcaptcha-react

2.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 26
  • Score
    100M100P100Q56878F
  • License Apache-2.0

TrustCaptcha – Privacy-first CAPTCHA solution for React. GDPR-compliant, bot protection made in Europe.

Package Exports

  • @trustcomponent/trustcaptcha-react
  • @trustcomponent/trustcaptcha-react/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@trustcomponent/trustcaptcha-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm

TrustCaptcha for React — GDPR-compliant, privacy-first CAPTCHA

Protect websites and apps against bots and spam with a privacy-first, EU-hosted CAPTCHA solution.

What is TrustCaptcha?

TrustCaptcha combines proof-of-work, an AI bot-score and custom security rules to stop automated bot abuse — without image marking or puzzles

Key perks:

  • Privacy-friendly & GDPR-compliant – data processed exclusively in Europe
  • No visual challenges – users never label images or solve quizzes
  • Fully themable widget – matches any brand and design and improves your user flow
  • Conversion-safe – near-zero user drop-off compared to legacy CAPTCHAs

Read the full TrustCaptcha product overview for technical details and the security concept.

Get started

  1. Create an account: sign up / sign in.
  2. Choose a CAPTCHA: pick an existing one or create a new one.
  3. Embed the widget: implement the TrustCaptcha widget into your website or app.
  4. Validate result: validate the CAPTCHA verification result in your backend.

Need a walkthrough? See the React integration guide.

Basic React integration

  1. Install the package
npm i @trustcomponent/trustcaptcha-react
  1. Use the TrustCaptcha component in any form element
import {TrustcaptchaComponent, defineCustomElements} from "@trustcomponent/trustcaptcha-react";

defineCustomElements()

function App() {

  function handleSuccess(verificationToken) {
    // handle success
  }

  function handleError(error) {
    // handle error
  }

  return (
    <div>
      <form>

        <!-- your input fields -->

        <TrustcaptchaComponent
          sitekey="<your-site-key>"
          onCaptchaSolved={event => handleSuccess(event.detail)}
          onCaptchaFailed={event => handleError(event.detail)}
        ></TrustcaptchaComponent>

        <!-- further input fields / submit button -->

      </form>
    </div>
  );
}

export default App;

Congratulations — you have successfully integrated the TrustCaptcha widget into your website!

For detailed implementation instructions, read the React integration guide.

Other pre-built integrations

TrustCaptcha ships ready-made integrations for popular stacks:

  • Platforms like WordPress, Joomla, CraftCMS or Keycloak
  • Frontends like JavaScript, Angular, React or Vue.js
  • Backends like Node.js, PHP, Python, Java, Ruby, Rust, Go or DotNet
  • Mobile Applications like iOS, Android, React Native or Flutter

Discover all our pre-built Integrations on our website.

Get support

Questions? We will be happy to help!