npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vycecap/react

v1.0.2

Published

React component for Vyce Captcha - Privacy-first invisible CAPTCHA

Downloads

266

Readme

@vycecap/react

React component for Vyce Captcha - Privacy-first invisible CAPTCHA using Proof-of-Work and AI.

Installation

npm install @vycecap/react

Quick Start

1. Load the Vyce Script

Add the Vyce script to your HTML or use a script loader:

<script src="https://vyce.cc/vyce.js" async defer></script>

Or in React:

import { useEffect } from 'react';

function App() {
  useEffect(() => {
    const script = document.createElement('script');
    script.src = 'https://vyce.cc/vyce.js';
    script.async = true;
    document.head.appendChild(script);
    return () => { document.head.removeChild(script); };
  }, []);
  
  return <MyForm />;
}

2. Use the Component

import { VyceCaptcha } from '@vycecap/react';

function MyForm() {
  const [token, setToken] = useState<string | null>(null);

  const handleSubmit = (e: React.FormEvent) => {
    e.preventDefault();
    if (!token) return alert('Please complete the captcha');
    
    // Submit form with token
    fetch('/api/submit', {
      method: 'POST',
      body: JSON.stringify({ vyce_token: token, ...formData }),
    });
  };

  return (
    <form onSubmit={handleSubmit}>
      <input name="email" type="email" required />
      
      <VyceCaptcha
        sitekey="your-site-key"
        mode="checkbox"
        onVerify={setToken}
        onError={(err) => console.error('Captcha error:', err)}
      />
      
      <button type="submit" disabled={!token}>
        Submit
      </button>
    </form>
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | sitekey | string | required | Your site key from Vyce dashboard | | mode | 'checkbox' \| 'auto' \| 'invisible' | 'checkbox' | Widget display mode | | lang | string | 'en' | Language code | | onVerify | (token: string) => void | - | Called on successful verification | | onError | (error: string) => void | - | Called on verification failure | | onExpire | () => void | - | Called when token expires | | className | string | - | Additional CSS classes | | style | React.CSSProperties | - | Inline styles |

Ref Methods

Use a ref to control the widget programmatically:

import { useRef } from 'react';
import { VyceCaptcha, VyceCaptchaRef } from '@vycecap/react';

function MyForm() {
  const captchaRef = useRef<VyceCaptchaRef>(null);

  const handleReset = () => {
    captchaRef.current?.reset();
  };

  const handleInvisibleSubmit = async () => {
    const token = await captchaRef.current?.execute();
    // Submit with token
  };

  return (
    <>
      <VyceCaptcha
        ref={captchaRef}
        sitekey="your-site-key"
        mode="invisible"
        onVerify={(token) => console.log('Verified:', token)}
      />
      <button onClick={handleReset}>Reset</button>
      <button onClick={handleInvisibleSubmit}>Submit</button>
    </>
  );
}

| Method | Returns | Description | |--------|---------|-------------| | getToken() | string \| null | Get current verification token | | reset() | void | Reset widget to initial state | | execute() | Promise<string> | Manually trigger verification (invisible mode) |

Modes

Checkbox Mode (Default)

User clicks "I am human" checkbox to verify.

<VyceCaptcha sitekey="..." mode="checkbox" onVerify={setToken} />

Auto Mode

Automatically verifies when the widget loads.

<VyceCaptcha sitekey="..." mode="auto" onVerify={setToken} />

Invisible Mode

Hidden widget, trigger verification programmatically.

<VyceCaptcha ref={captchaRef} sitekey="..." mode="invisible" />
// Later: await captchaRef.current.execute()

Supported Languages

en, de, es, fr, pt, it, nl, pl, ru, zh, ja

Next.js Example

// pages/contact.tsx
import { VyceCaptcha } from '@vycecap/react';
import Script from 'next/script';

export default function Contact() {
  const [token, setToken] = useState<string | null>(null);

  return (
    <>
      <Script src="https://vyce.cc/vyce.js" strategy="lazyOnload" />
      
      <form>
        <VyceCaptcha
          sitekey={process.env.NEXT_PUBLIC_VYCE_SITEKEY!}
          onVerify={setToken}
        />
      </form>
    </>
  );
}

License

MIT © Vyce Captcha