Staaarter

Webhook Event Stream

A webhook delivery log styled like a real-time event stream. Each row shows the event type, delivery status, response time, and timestamp, and expands in place to reveal the event's formatted JSON payload. Built for API dashboards and integration debugging pages.

By Staaarter Team
DevTools
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/webhook-event-stream.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/devtools/devtools18.tsx instead.

Usage

The file also exports devtools18Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Devtools18, devtools18Demo } from "@/components/blocks/devtools/devtools18";

export default function Page() {
  return <Devtools18 {...devtools18Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Webhook Event Stream"Section heading.
descriptionstringundefinedSection intro text below the heading.
eventsWebhookEvent[]noneEvent rows, most recent first.
classNamestringnoneExtra classes for the outer section element.

Types

type DeliveryStatus = "delivered" | "failed" | "retrying";

type WebhookEvent = {
  id: string;
  type: string;
  status: DeliveryStatus;
  responseTime: string;
  timestamp: string;
  payload: string;
};

Behavior notes

  • Row expand/collapse is real local state (a Set of expanded event ids); it does not fetch anything, it just reveals the payload string already passed in for that event.
  • payload is a plain preformatted string supplied by the caller (not parsed or re-serialized JSON), so indentation and formatting are exactly whatever the caller wrote.
  • This is not a live stream; there is no polling, websocket, or auto-appending of new events, the list is the fixed set passed via events.
  • The expanded payload panel intentionally uses a fixed dark, monospace treatment instead of the site's semantic tokens, matching the repo's code-panel convention for this category.