RE

React Hcaptcha

@hcaptcha/react-hcaptcha

A React library for hCaptcha

Utilities
hcaptcha
hcaptcha-react
react
captcha
@hcaptcha/react-hcaptcha
Utilities
javascript
npm
frontend
open source
Stars
285
Weekly
702k
Open issues
4
Bundle
~25 kB

Installation

npm install @hcaptcha/react-hcaptcha

Code example

import { useHcaptcha } from "@hcaptcha/react-hcaptcha";

export function Example() {
  const value = useHcaptcha();
  return <p>{String(value)}</p>;
}

Pros & cons

Pros

  • Actively maintained by hCaptcha team and contributors
  • 702k weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 4 open issues on GitHub

FAQs

Alternatives & similar libraries