• Stars
    star
    373
  • Rank 114,600 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 2 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cloudflare Turnstile integration for React.

React Turnstile

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 | 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

  • 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.

Credits

Inspired by

Support

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

License

Published under the MIT License.

More Repositories

1

bubble

Live and secure chat. UI inspired by WhatsApp. Powered by Twilio Conversations API.
TypeScript
10
star
2

codember.js

Solutions for codember.dev challenges. In JavaScript.
JavaScript
7
star
3

climatic

Monorepo project that shows the current weather data and weather forecast for next 7 days. Created from scratch to participate in a 14-days hackathon.
TypeScript
7
star
4

adventjs

πŸŽ„ AdventJS Solutions by marsidev
JavaScript
6
star
5

web

My personal dev site built with Next.js, Chakra-UI, and TypeScript.
TypeScript
6
star
6

create

Create multiple files from your command line.
TypeScript
4
star
7

get-sc-key

This is an API to generate a fresh API key for Supercell games for your current IP. It supports Clash Royale, Clash of Clans, and Brawl Stars.
JavaScript
3
star
8

eslint-config-marsi

Shareable ESLint config, used on my personal JavaScript/TypeScript/React projects.
JavaScript
2
star
9

pwdg

Generate strong passwords to stay safe over the internet.
TypeScript
2
star
10

cr-proxy

JavaScript
1
star
11

regex

TypeScript
1
star
12

resizable-panels-with-movable-items

JavaScript
1
star
13

marsidev

1
star
14

twilio-token-service

JavaScript
1
star
15

timezone-es

Convierte tu hora local a la zona horaria de los paΓ­ses hispanohablantes.
TypeScript
1
star
16

next-js-13-demo

TypeScript
1
star
17

react-hooks

A collection of common React hooks. Made with TypeScript.
TypeScript
1
star
18

twitter-smart-contract-stackup-quest

JavaScript
1
star
19

MarsiDarkTheme

1
star
20

vite-with-api

TypeScript
1
star
21

AxieHub

Axie Infinity's fan site where you can find tools related to Axie Infinity such cards explorer. Originally created as an entry for Origin Education Challenge.
JavaScript
1
star
22

axie-data-hub

This is a proxy API for Axie Infinity with a lot of features. Built with nodejs and express.
JavaScript
1
star
23

overnote

Overnote is a simple notes app. It allows you to create, edit, customize, and delete notes.
JavaScript
1
star