shadcn.io is not affiliated with official shadcn/ui
Webhook Tested Success Block for React
A confirmation window for a tested webhook: a table of deliveries that Send again adds a second to, and for the chosen one its status, time and copyable id with tabs for the response and request bodies in a JSON tree and the headers in a table.
Installation
Overview
Show exactly what a test delivery looked like, with this confirmation window for React with Base UI. It is the Relaydock console just after an endpoint was tested, in a fixed-height window with no title bar: a top bar with a mark, the heading and the one action, the Shine Button that saves the endpoint. On the list side a native table holds the deliveries, one on load and an outline Button, Send again, that fills a held slot with a typed second. The detail side shows the chosen delivery's status and time, its delivery id with a Copy Button, the endpoint with a Badge that says whether it is saved, and three Tabs: the response and the request bodies in a JSON Tree View and the response headers in a table. Nothing was sent. For webhook, API and event-delivery consoles, or the screen after any test call.
FAQ
What stays in the page, and how do I wire it for real?
Nothing was delivered or stored. The two deliveries, their ids and times, the bodies and the headers are typed constants at the top of the file, and the host ends in .example. Send again only lists the second one, and Save changes only turns the badge to Saved. To wire it, fill DELIVERIES from your delivery log, make Send again call your relay's test endpoint and add the row it returns, and make Save changes store the endpoint. Show a failed status (a non-2xx code) in the same row and detail; the layout does not change.
What does Send again do, and why does the list not move?
It lists a second sample delivery, selects it and says "Sent again in this demo. Nothing was delivered." The second slot is held from the start by a quiet row of the same height, so the window and the detail below it on a phone never move. Once both are listed the button stays in place, keeps its focus and answers with "Both sample deliveries are listed.".
How do the three tabs work with the keyboard?
The tabs follow the library's own keys. In the JSON trees the arrow keys move between nodes and open or close the ones that hold more, and the headers table sits in a named region that takes focus so a keyboard can scroll a wide value sideways. The bodies read as plain foreground text, since status never relies on colour here: "200 OK" has a check and its words.
What does Save changes do?
The endpoint is a draft when the page opens, so the badge says Not saved and the button is the one primary. Pressing it says "Saved in this demo. Nothing was stored.", turns the badge to Saved and leaves the button where it is, quiet, so a second press answers "No changes to save." instead of vanishing.
What does the copy button copy?
The chosen delivery's id (for example dlv_4f8a21), through the browser's clipboard, and it says so in the window's one live line. If the clipboard refuses, the line says it could not copy and to copy it by hand. Pick the second delivery and the button copies that one's id.
How does the window behave on a phone?
It keeps its height (36rem on a phone, 46rem from the medium breakpoint) and scrolls inside itself. Below the medium breakpoint the deliveries sit above the detail, and the tab panels grow with their content instead of scrolling on their own. The live line stays at the window's foot.
Related
- Pro
Analytics Connected Success
Integrations and syncsA confirmation window for connected analytics: a counting events-a-minute figure, a table of the first eight events that fade in and a bounded feed with Pause, and a docked panel of the chosen event's properties in a JSON tree.
- Pro
Webhook Endpoints Settings
API and webhooksA webhook endpoint settings sheet open over the endpoint list: an https URL, an event tree with mixed-state group checkboxes, a signing secret with Roll secret, and recent deliveries where a failed one can be resent with its signature worked out in the browser.
- Pro
Webhook Events Changelog
APIs and integrationsSix webhook events as accordion rows with a New, Updated or Deprecated tag, a filter with counts, and an example payload with a Copy button in each row.
- Pro
Deployment Live Success
Builds and deploysA confirmation window for a live deploy: a drawn browser with the real address and a copy button, a group of buttons that redraws the site at desktop, tablet and phone width, and the deploy's facts and four passed checks beside it.
- Pro
Integration Added Success
Integrations and syncsA confirmation panel for a new Slack connection: the first alert drawn as a greyscale message that a channel menu redraws, the two marks, the workspace and scopes, a local test message and one Open settings button.
- Pro
Sync Completed Success
Integrations and syncsA confirmation panel for a finished data sync: a table of records created, updated and skipped for four objects with a segmented bar under each name, a switch for a 15-minute schedule with the next run time, and a Sync now button that adds a second run.