Source Code

<div class="container py-5 d-flex justify-content-center">
  <div class="card bswh-card">
    <div class="card-body p-3">
      <h6 class="fw-bold mb-2">Webhook deliveries</h6>
      <ul class="list-unstyled mb-0" id="bswhList"></ul>
    </div>
  </div>
</div>

Bootstrap Webhook Event Viewer — Free HTML CSS JS Snippet

Bootstrap Webhook Event Viewer · Dashboards · Plain HTML, CSS & JS · Live preview

What's included

Features

Each row tracks its own independent expanded state, not a single shared "currently open" row id
Status badges reuse the same 2xx/4xx/5xx family-coloring logic as this collection's HTTP status badge
Retry only appears on deliveries that actually failed, never on an already-successful one
A retried delivery updates in place to a real success state and timestamp, not just a static confirmation message
Raw payloads render in a monospace, horizontally scrollable block, safe for long JSON content

About this UI Snippet

Bootstrap Webhook Event Viewer — HTML, CSS & JavaScript

Screenshot of the Bootstrap Webhook Event Viewer snippet rendered live

Each delivery tracks its own open boolean, toggled independently by clicking its row header — expanding one delivery's payload has no effect on any other row's expanded state, since render() derives every row's visibility purely from that row's own open value rather than a single "currently expanded id" that would force closing one to open another.

toneFor(status) reuses the same status-family logic as bootstrap-http-status-badge — a 2xx delivery badges green, 4xx amber, 5xx red — so a user can scan the list and immediately spot which deliveries need attention without reading every status code individually.

Retry only appears on a row whose status >= 400, since retrying a delivery that already succeeded is a meaningless action. Clicking it disables the button, shows "Retrying...", and after a simulated delay mutates that specific event's status to 200 and updates its timestamp — a real implementation would replace that timeout with an actual re-delivery API call, treating a successful response the same way this demo treats the simulated one.

Build with AI

Build, Understand, Optimize, and Extend It With AI

Hand this snippet to an AI coding assistant like Claude and ask it to add response headers alongside the payload in the expanded view, or to add a filter toggle showing only failed deliveries, making it faster to find and retry everything that needs attention.

Prompt to recreate it

Copy this into your AI assistant of choice to build the effect from scratch, or as a jumping-off point for your own variant:

text
Build a Bootstrap 5.3 webhook delivery event viewer, using the real Bootstrap CDN framework (bootstrap.min.css and bootstrap.bundle.min.js), not custom CSS made to resemble it.

Requirements:
- A list of at least 4 sample webhook deliveries, each with an event name, an HTTP status code shown as a colored badge (green for 2xx, amber for 4xx, red for 5xx), and a relative timestamp.
- Clicking a delivery's row expands it in place to reveal its raw JSON payload in a monospace block; each row's expanded state must be tracked independently, so multiple rows can be expanded at once without affecting each other.
- A "Retry delivery" button must appear only inside the expanded view of deliveries with a status of 400 or higher — never on an already-successful delivery.
- Clicking Retry must disable the button, show a "Retrying..." state, and after a short simulated delay update that specific delivery's status to a success code and its timestamp, re-rendering it in place without a Retry button anymore.

Want to tighten it up first? Run this prompt through the AI Prompt Studio to score it across 8 quality dimensions, catch anti-patterns, and tune the wording for Claude, ChatGPT, or Gemini before you paste it in.

Step by step

How to Use

  1. 1
    Load the snippetFour webhook deliveries list, each with a status badge, event name, and relative time — none expanded yet.
  2. 2
    Click the "invoice.paid" rowIt expands to reveal its raw JSON payload; no Retry button shows, since it already succeeded.
  3. 3
    Click the "customer.subscription.updated" row (500 status)It expands showing its payload and a "Retry delivery" button.
  4. 4
    Click "Retry delivery"The button disables and shows "Retrying...", then the row updates to a 200 status with an updated timestamp.
  5. 5
    Expand a different row while the first stays expandedBoth rows stay independently expanded — opening one never closes another.

Real-world uses

Common Use Cases

DEV
Payment and billing integration dashboards
The exact kind of delivery log shown by Stripe, GitHub, and most webhook-driven platforms for debugging integrations.
Internal API and integration monitoring tools
Pairs with bootstrap-api-response-viewer for a fuller request/response debugging panel.
Admin panels for a platform sending webhooks to customers
Let customers or support staff review and retry failed webhook deliveries directly.

Got questions?

Frequently Asked Questions

Yes — each row's open state is tracked independently, so expanding one has no effect on any other row; there's no artificial limit to a single expanded row at a time.

It only renders when a delivery's status is 400 or above — retrying an already-successful (2xx) delivery has no meaningful action to perform, so the button is withheld entirely rather than shown disabled.

This demo simulates the outcome with a timeout; a real implementation should call your actual re-delivery API endpoint and update the row's status based on that request's genuine result, success or failure.

Yes. Keep the events array (including each event's open boolean) in component state, toggle a specific event's open flag immutably on row click, and update its status/time fields the same way on a successful retry.