GithubHelp home page GithubHelp logo

archieedwards / react-turnstile Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marsidev/react-turnstile

0.0 0.0 0.0 566 KB

Cloudflare Turnstile integration for React.

Home Page: https://www.npmjs.com/package/@marsidev/react-turnstile

License: MIT License

JavaScript 0.75% TypeScript 99.25%

react-turnstile's Introduction

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

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.

Contributors

Contributors

Credits

Inspired by

Support

If you like this project, please consider supporting it through a PayPal donation. ๐Ÿ˜Š

License

Published under the MIT License.

react-turnstile's People

Contributors

marsidev avatar chez14 avatar jinsley8 avatar ianvs avatar kaichii avatar luca-rath avatar futantan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.