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

@zachtrice/react-contact-form

v0.1.1

Published

Tiny, unstyled, dependency-free React contact form: honeypot spam trap, validation, and a JSON POST to any endpoint. Bring your own styles.

Readme

@zachtrice/react-contact-form

A tiny, unstyled, dependency-free React contact form:

  • Built-in honeypot spam trap (bots fill a hidden field; humans don't).
  • Required-field validation and idle → sending → sent / error status handling.
  • JSON POST to any endpoint you provide (SES Lambda, Formspree, your API…).
  • No CSS imposed: style it with className / classNames hooks. Ships types.

Install

npm install @zachtrice/react-contact-form

Usage

import { ContactForm } from '@zachtrice/react-contact-form'

export default function Contact() {
  return (
    <ContactForm
      endpoint={process.env.NEXT_PUBLIC_CONTACT_ENDPOINT!}
      classNames={{
        form: 'flex flex-col gap-4',
        label: 'text-sm text-muted',
        input: 'rounded border px-3 py-2',
        textarea: 'rounded border px-3 py-2',
        button: 'rounded bg-black px-5 py-2 text-white disabled:opacity-60',
        error: 'text-sm text-red-500',
        success: 'rounded border p-4'
      }}
    />
  )
}

The POST body defaults to { name, email, message } (plus any extraFields).

Props

| prop | type | default | description | | --- | --- | --- | --- | | endpoint | string | — | Required. Receives the JSON POST. | | fields | ('name'\|'email'\|'message')[] | all three | Which fields to render, in order. | | labels | Partial<Record<field,string>> | — | Override field labels. | | placeholders | Partial<Record<field,string>> | — | Field placeholders. | | honeypotName | string | 'company' | Hidden spam-trap field name. | | submitLabel | string | 'Send message' | | | sendingLabel | string | 'Sending…' | | | successMessage | ReactNode | default text | Shown after a successful send. | | extraFields | Record<string,string> | — | Merged into the POST body. | | transformPayload | (data) => unknown | — | Customize the request body. | | onSuccess / onError | () => void / (err) => void | — | Callbacks. | | className | string | — | Class on the <form>. | | classNames | ContactFormClassNames | {} | Class hooks for every element. |

Endpoint contract

The endpoint receives Content-Type: application/json with the collected fields. Any non-2xx response is surfaced as an error. Pair it with a small SES (or other) function on the backend.

License

MIT © ZachTRice