marsidev / react-turnstile

Cloudflare Turnstile integration for React.
https://www.npmjs.com/package/@marsidev/react-turnstile
MIT License
412 stars 25 forks source link
captcha cloudflare turnstile

React Turnstile

Cloudflare Turnstile widget

Cloudflare Turnstile integration for React.

npm version npm downloads install size bundle size CI status tested with playwright PRs are welcome

Features

Docs | Demo

Getting started

  1. Follow these steps to obtain a free site key and secret key from Cloudflare.
  2. Install @marsidev/react-turnstile into your React project.

    npm i @marsidev/react-turnstile

Usage

import { Turnstile } from '@marsidev/react-turnstile'

function Widget() {
  return <Turnstile siteKey='1x00000000000000000000AA' />
}

Checkout the docs for more examples and for a detailed info about the Turnstile props.

Checkout the demo for a live example.

Contributing

Any contributions are greatly appreciated. If you have a suggestion that would make this project better, please fork the repo and create a Pull Request. You can also open an issue.

Development

The library is written under the packages/lib folder, the demo page is under the demos/nextjs folder and the docs are under the docs folder.

Contributors

Contributors

Credits

Inspired by

Support

If you like this project, please consider supporting it through a PayPal donation. :blush:

License

Published under the MIT License.