
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
@captchafox/react
Advanced tools
[](https://www.npmjs.com/package/@captchafox/react)
Install the library using your prefered package manager
npm install @captchafox/react
yarn add @captchafox/react
pnpm add @captchafox/react
bun add @captchafox/react
import { CaptchaFox } from '@captchafox/react';
function Example() {
return <CaptchaFox sitekey="sk_11111111000000001111111100000000" />;
}
Prop | Type | Description | Required |
---|---|---|---|
sitekey | string | The sitekey for the widget | ✅ |
lang | string | The language the widget should display. Defaults to automatically detecting it. | |
mode | inline|popup|hidden | The mode the widget should be displayed in . | |
theme | light | dark | ThemeDefinition | The theme of the widget. Defaults to light. | |
nonce | string | Randomly generated nonce . | |
i18n | object | Custom i18n configuration. | |
onVerify | function | Called with the response token after successful verification. | |
onFail | function | Called after unsuccessful verification. | |
onError | function | Called when an error occured. | |
onExpire | function | Called when the challenge expires. | |
onClose | function | Called when the challenge was closed. |
import { CaptchaFox, CAPTCHA_RESPONSE_KEY } from '@captchafox/react';
function Example() {
const handleVerify = (token: string) => {
// do something with the token here (e.g. submit the form)
const formData = {
// your form data
[CAPTCHA_RESPONSE_KEY]: token
};
};
return <CaptchaFox sitekey="sk_11111111000000001111111100000000" onVerify={handleVerify} />;
}
import { useRef } from 'react'
import { CaptchaFox, CaptchaFoxInstance } from '@captchafox/react'
function Example() {
const captchaRef = useRef<CaptchaFoxInstance | null>(null);
const triggerAction = async () => {
// execute the captcha
try {
const token = await captchaRef.current?.execute()
} catch {
// unsuccessful verification
}
}
return (
<CaptchaFox
sitekey="sk_11111111000000001111111100000000"
ref={captchaRef}
/>
<button onClick={triggerAction}>Action</button>
)
}
You can find more detailed examples in the GitHub repository.
FAQs
[](https://www.npmjs.com/package/@captchafox/react)
The npm package @captchafox/react receives a total of 933 weekly downloads. As such, @captchafox/react popularity was classified as not popular.
We found that @captchafox/react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.