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

@boosterpack/react-form

v0.1.2

Published

React component for Boosterpack Forms — invisible spam protection, no CAPTCHA

Readme

@boosterpack/react-form

React component + hook for Boosterpack Forms — invisible spam protection via Proof-of-Work (no CAPTCHA).

  • Handles PoW + anti-spam hidden fields automatically
  • Checks form status on mount and shows activation prompts when needed
  • Submits directly to the Boosterpack Forms API (no embed.js needed)

Install

npm i @boosterpack/react-form

Usage (component)

'use client'

import { BoosterpackForm } from '@boosterpack/react-form'

export function ContactForm() {
  return (
    <BoosterpackForm formId="<FORM_ID>">
      {({ status, error }) => (
        <>
          <input name="name" placeholder="Name" required />
          <input name="email" type="email" placeholder="Email" required />
          <textarea name="message" placeholder="Message" required />

          <button type="submit" disabled={status === 'sending'}>
            {status === 'sending' ? 'Sending…' : 'Send'}
          </button>

          {status === 'success' && <p>Sent. Check your inbox.</p>}
          {status === 'error' && error && <p>{error}</p>}
        </>
      )}
    </BoosterpackForm>
  )
}

The component automatically checks form status on mount. If the form needs activation or the domain isn't allowed, a built-in overlay prompts the user (just like embed.js). Set showActivationOverlay={false} to handle this yourself.

Usage (hook)

'use client'

import { useBoosterpackForm } from '@boosterpack/react-form'

export function ContactForm() {
  const {
    status,
    error,
    formRef,
    handleSubmit,
    reset,
    formReady,
    activationStatus,
    requestActivation,
  } = useBoosterpackForm({
    formId: '<FORM_ID>',
    // serviceOrigin: 'http://localhost:3000', // optional for local/staging
  })

  return (
    <form ref={formRef} onSubmit={handleSubmit}>
      {formReady === 'not_activated' && (
        <div>
          <p>This form needs activation.</p>
          <button type="button" onClick={requestActivation}>
            {activationStatus === 'sent' ? 'Check your email' : 'Activate now'}
          </button>
        </div>
      )}

      {formReady === 'domain_not_allowed' && (
        <div>
          <p>This domain is not enabled yet.</p>
          <button type="button" onClick={requestActivation}>
            {activationStatus === 'sent' ? 'Check your email' : 'Enable domain'}
          </button>
        </div>
      )}

      <input name="name" placeholder="Name" required />
      <input name="email" type="email" placeholder="Email" required />
      <textarea name="message" placeholder="Message" required />

      <button type="submit" disabled={status === 'sending' || formReady !== 'ready'}>
        {status === 'sending' ? 'Sending…' : 'Send'}
      </button>

      {status === 'success' && (
        <button type="button" onClick={reset}>
          Send another
        </button>
      )}
      {status === 'error' && error && <p>{error}</p>}
    </form>
  )
}

Options

<BoosterpackForm> props

| Prop | Type | Default | Description | |------|------|---------|-------------| | formId | string | — | Your Boosterpack Forms form ID (UUID). Required. | | serviceOrigin | string | https://boosterpackforms.com | Override for self-hosted or staging. | | onSuccess | () => void | — | Called after a successful submission. | | onError | (error: string) => void | — | Called when submission fails. | | autoReset | boolean | false | Reset to idle after success. | | autoResetDelay | number | 3000 | Delay (ms) before auto-reset. | | autoCheckStatus | boolean | true | Check form status on mount. | | showActivationOverlay | boolean | true | Show built-in activation overlay. |

useBoosterpackForm return values

| Field | Type | Description | |-------|------|-------------| | status | FormStatus | 'idle' · 'sending' · 'success' · 'error' | | error | string \| null | Error message when status is 'error'. | | formRef | RefObject<HTMLFormElement> | Attach to your <form>. | | handleSubmit | (e: FormEvent) => void | Attach to onSubmit. | | reset | () => void | Reset back to idle. | | formReady | FormReadyState | 'checking' · 'ready' · 'not_activated' · 'domain_not_allowed' · 'disabled' · 'not_found' · 'error' | | activationStatus | ActivationStatus | 'idle' · 'sending' · 'sent' · 'rate_limited' · 'error' | | activationError | string \| null | Error from the last activation attempt. | | activationRetryAfter | number \| null | Seconds until rate limit resets. | | requestActivation | () => void | Send activation/domain-approval email. | | recheckStatus | () => void | Re-check form status from the server. |

Notes

  • No file uploads: only text fields are supported.
  • React peer deps: React 18+ and ReactDOM 18+.

License

MIT