Skip to content

Undeveloped/react-grecaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-grecaptcha

React.js Google reCAPTCHA v2 integration component.

Travis Codecov Status npm package npm downloads license

Dependency Status devDependency Status peerDependency Status

Feature

  1. Isomorphic support. (Only render on client side.)
  2. Lazy load scripts for routing.
  3. Automatically render the reCAPTCHA widget.
  4. I18n support.

Quick Demo on Webpackbin

http:https://www.webpackbin.com/4yr28fNzb

Installation

$ npm install react-grecaptcha --save

Usage

const verifyCallback = response => console.log(response);
const expiredCallback = () => {...};

<Recaptcha
  sitekey={RECAPTCHA_SITE_KEY}
  callback={verifyCallback}
  expiredCallback={expiredCallback}
  locale="zh-TW"
/>

API

  • To reset the recaptcha:
window.grecaptcha.reset();

Test

$ npm run test:watch

CONTRIBUTING

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests ($ npm test).

MIT: http:https://michaelhsu.mit-license.org

About

React.js Google reCAPTCHA v2 integration component.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 100.0%