Webhook Test

Webhook Test is a copy-paste React component that stops webhook saved to an unreachable url before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/webhook-test
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsWebhook saved to an unreachable URL

Was this component page useful?

How do I install Webhook Test?

pnpm dlx shadcn@latest add @bollard/webhook-test

The files land in your project. They're yours to edit.

How do I use Webhook Test in React?

webhook-test-usage.tsx
import { WebhookTest, type WebhookTestResponse } from "@/components/ui/webhook-test"

return <WebhookTest label="Stripe webhook URL" defaultValue="http://hooks.acme.dev/stripe" onSendTest={fakeSend} />

What input mistakes does Webhook Test catch?

  • localhost, private and link-local IPs the sender can't reach
  • Plain http
  • Missing path and temporary tunnel URLs
  • Redirects, with a switch to the final URL
  • Replies close to the sender's timeout (default 10 s)
  • 200 responses that are really login pages

What props does Webhook Test accept?

WebhookTest props
PropTypeDefault
label

Visible label.

string"Webhook URL"
value

Controlled URL text.

string—
defaultValue

Initial URL text when uncontrolled.

string""
onValueChange

Called with the text on every change, including one-tap fixes.

(value: string) => void—
onSendTest

Sends one test delivery, usually through your backend. Abort when the signal fires.

(url: string, signal: AbortSignal) => Promise<WebhookTestResponse>—
timeout

How long the real sender waits, in ms (GitHub: 10 s). Slow replies are flagged against it.

number10_000
sendLabel

Label of the send-test button.

string"Send test"
useUrlLabel

Label of the fix that switches to a corrected URL.

string"Use this URL"
timeoutMessage

Shown when the test didn't answer in time; `{seconds}` is filled in.

string"No reply in {seconds} s. The sender would mark this deli…
errorMessage

Shown when the sender itself failed (network error).

string"The test couldn't connect to this URL."
staleMessage

Shown over a result for a URL that has since changed.

string"URL changed since this test."

* required. Also accepts the native props of <input> (className, aria-*, data-*…), passed through to it.

How is Webhook Test accessible?

  • Visible <label>; status via aria-describedby in a polite live region
  • Danger notes use role=alert
  • Fix and send buttons have text labels

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

This is a UX guard rail. Enforce on the server: Validate webhook URLs server-side (resolve DNS, block private ranges) to prevent SSRF, and sign deliveries.

  • Test delivery runs through your onSendTest; results depend on where it's sent from
  • Hostname checks don't resolve DNS, so names pointing at private IPs aren't caught

What validation rules apply to Webhook Test?

Rules last verified:

Confirmed GitHub asks receivers to respond within 10 seconds. Other senders use different timeouts; set timeout. Copied components don't update themselves, so re-check after rule changes (see updating a component).

What expensive mistakes does Webhook Test stop?

Webhook saved to an unreachable URL

Also known as

webhook · test webhook · send test event · endpoint · integrations · stripe · dodo payments · razorpay

Field type

What dependencies does Webhook Test require?

Webhook Test facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameWebhook Test
Registry identifier@bollard/webhook-test
Install commandnpx shadcn@latest add @bollard/webhook-test
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Webhook Test

What form validation mistake does Webhook Test catch?

Webhook Test prevents webhook saved to an unreachable URL. Checks a webhook URL the way the sender will before it's saved: reachability, https, redirects, slow replies and login pages. Catches: localhost, private and link-local IPs the sender can't reach, Plain http, Missing path and temporary tunnel URLs, Redirects, with a switch to the final URL, Replies close to the sender's timeout (default 10 s), 200 responses that are really login pages. Limitation: validate webhook-test schemas on backend.

How do I install webhook-test with shadcn?

Run `npx shadcn@latest add @bollard/webhook-test`. Sources added: registry/default/webhook-test/webhook-rules.ts, registry/default/webhook-test/webhook-test.tsx. Package requirements: lucide-react.

What props customize Webhook Test?

Webhook Test accepts `label`, `value`, `defaultValue`, `onValueChange`, `onSendTest`. Configures webhook, test webhook, send test event behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of webhook-test?

Test delivery runs through your onSendTest; results depend on where it's sent from. Hostname checks don't resolve DNS, so names pointing at private IPs aren't caught Server requirement: Validate webhook URLs server-side (resolve DNS, block private ranges) to prevent SSRF, and sign deliveries.

How does Webhook Test meet accessibility guidelines?

Visible <label>; status via aria-describedby in a polite live region. Danger notes use role=alert. Fix and send buttons have text labels. Minimizes errors: test webhook delivery, webhook redirect fails.

Which components pair with Webhook Test?