Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/marsidev/react-turnstile

Cloudflare Turnstile integration for React.
https://github.com/marsidev/react-turnstile

captcha cloudflare turnstile

Last synced: 9 days ago
JSON representation

Cloudflare Turnstile integration for React.

Awesome Lists containing this project

README

        


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

* 💪 Smart verification with minimal user interaction
* 🕵️‍♀️ Privacy-focused approach
* 💉 Automatic script injection
* ⚡️ SSR ready
* 💻 TypeScript support

## [Docs](https://docs.page/marsidev/react-turnstile/) | [Demo](https://react-turnstile.vercel.app/)

## Getting started

1. [Follow these steps](https://developers.cloudflare.com/turnstile/get-started/) to obtain a free site key and secret key from Cloudflare.
2. Install `@marsidev/react-turnstile` into your React project.

```bash
npm i @marsidev/react-turnstile
```

## Usage

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

function Widget() {
return
}
```

> Checkout [the docs](https://docs.page/marsidev/react-turnstile) for more examples and for a detailed info about the `Turnstile` props.

> Checkout [the demo](https://react-turnstile.vercel.app/) 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](https://github.com/marsidev/react-turnstile/issues/new).

## Development

* [Fork](https://github.com/marsidev/react-turnstile/fork) or clone this repository.
* Install dependencies with `pnpm install`.
* You can use `pnpm dev` to start the demo page in dev mode, which also rebuild the library when file changes are detected in the `packages/lib` folder.

> 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

* [nuxt-turnstile](https://github.com/danielroe/nuxt-turnstile)
* [svelte-turnstile](https://github.com/ghostdevv/svelte-turnstile)
* [react-google-recaptcha-v3](https://github.com/t49tran/react-google-recaptcha-v3)
* [reaptcha](https://github.com/sarneeh/reaptcha)

## Support

If you like this project, please consider supporting it through a [PayPal donation](https://paypal.me/marsigliacr). :blush:

## License

Published under the [MIT License](./LICENCE).