Socket
Socket
Sign inDemoInstall

@trustcaptcha/trustcaptcha-react

Package Overview
Dependencies
2
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @trustcaptcha/trustcaptcha-react

Trustcaptcha library for react


Version published
Maintainers
2
Created

Readme

Source

Trustcaptcha React-Library

The React library helps you to integrate Trustcaptcha into your React frontend applications.

What is Trustcaptcha?

A captcha solution that protects you from bot attacks and puts a special focus on user experience and data protection.

You can find more information on your website: www.trustcaptcha.com.

How does the library work?

Detailed instructions and examples for using the library can be found in our documentation.

Short example

Here you can see a short code example of a possible integration. Please refer to our provided documentation for complete and up-to-date integration instructions.

  1. Installing the library

npm i @trustcaptcha/trustcaptcha-react

  1. Use the Trustcaptcha component in any form element
import {TrustcaptchaComponent, defineCustomElements} from "@trustcaptcha/trustcaptcha-react";

defineCustomElements()

function App() {

  function handleSuccess(verificationToken) {
    // handle success
  }

  function handleError(error) {
    // handle error
  }

  return (
    <div>
      <form>

        <!-- your input fields -->

        <TrustcaptchaComponent
          sitekey="cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a"
          onCaptchaSolved={event => handleSuccess(event.detail)}
          onCaptchaFailed={event => handleError(event.detail)}
        ></TrustcaptchaComponent>

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

      </form>
    </div>
  );
}

export default App;

Ideas and support

If you have any ideas, suggestions, or need support, please contact us.

Keywords

FAQs

Last updated on 05 May 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc