Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Error Debug Logs Window Block for React

A debug-log viewer for an API monitoring tool, as a fixed-height app window: a Critical badge and copyable error id, a level filter with counts, eight log lines with the failing one marked, and a foot that copies, downloads and reports.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Show the log that explains an error where people can use it, with this debug-log error block for React with Base UI. It's the error window of Probehurst, an API monitoring tool, drawn as an app window in a fixed-height frame on plus-marked corners ruled by Guides. The top bar holds the heading "Request failed", a Badge with the page's one Status dot and the word Critical, and the error id with a Copy Button. Under it a Toggle Group filters the log by level, All, Warn or Error, each with its count. The log is eighteen typed lines in a themed monospace region: a numbered gutter that keeps each line's own number when the log is filtered, a time, a level word and the message, with the failing request marked by a heavy edge and the word "failed". The foot says what is shown, copies the shown lines, saves them with a Download Trigger as a text file, reports the issue with a Shine Button, the only colored control, and links to support. Only the log scrolls; the window never changes height. It's built from Toggle Group, Badge, Status, Copy Button, Download Trigger, Shine Button and Guides, with a CSS entrance only. For the error screen of a developer tool or any app with a debug panel.

FAQ

What do Copy logs, Download and Report issue do, and what stays in the page?

Copy logs writes the lines the filter is showing to the real clipboard, and Download saves the same lines as a real text file named for the filter, both typed content from the block. Report issue shows a spinner for under a second and then says it drafted an issue with the error id and the line count; nothing is sent. To wire it for real, post the log, the error id and the visitor's note to your issue tracker where the code says so, and show its error in the status line if it fails.

How do I show my own log?

Edit LINES. Each line has a no (its position in the whole log), a time, a level of info, warn or error, a message, and failed on the one line the request failed on. The level counts, the filter, the copied text and the downloaded file all derive from that one list. Redact keys, tokens and personal data before showing a log to anyone, and show it only to people who should see it.

Why isn't the log pane dark?

The block follows your theme, so the log is a light pane in a light theme and a dark one in a dark theme, drawn from theme tokens. A log doesn't have to be dark to be readable: it needs a monospace face, a numbered gutter and one clear mark for the failing line, which here is a heavy edge and the word "failed" rather than a color.

How does the level filter work?

The three buttons show all lines, only the warnings or only the errors, and the polite status line below says which, such as "Showing 3 of 8 lines: error only". A level is always chosen: pressing the chosen one keeps it. Lines keep their own numbers, so a gap in the gutter tells you what's hidden.

How does it look on a phone?

The window keeps its fixed height and the log scrolls both ways inside it, so long lines never widen the page. The error id text hides, and its copy button stays; the foot's buttons wrap onto two rows and Report issue stays first.

Is it usable with a keyboard and a screen reader?

The log region is a labelled focus stop of its own, so the keyboard can scroll it with the arrow keys, and each line is a list item that reads its number, time, level and message. The filter is a labelled group of toggle buttons. After Report issue, focus moves to the status line so the result is read out. Severity is a word and a weight in every line; the only color is the dot beside Critical.

  • Pro

    500 Server Error

    Server and outages

    A full-height 500 page for an event-ticketing site: the heading, a copyable reference and time, a Try again that honestly keeps failing, and a framed figure of the request's path with the failed stop marked.

  • Pro

    Server Error Incident Card

    Server and outages

    A server-error panel for a studio-booking app: a card of what the page knows (error type, time, a copyable request id, retries) and what you can do, with a Retry that adds a typed retry and keeps failing.

  • Pro

    Error Support Channels

    Help and support

    A full-height error page for a handmade-goods marketplace that sends you to a person: three channels with their real cost in time, and a composer whose heading and button follow the channel and that attaches the error details.

  • Pro

    Error Feedback Form

    Help and support

    A full-height error page for a document-export tool that asks what you were trying to do: quick-pick chips that start the message, a checked message and optional email, and a thank-you that replaces the form in place.

  • Pro

    A full-height error page for a video-call app that walks you through four fixes: a Try again that honestly keeps failing, ticked steps each with a why and a How, a four-part bar, and a Still stuck note that switches on when all four are ticked.

  • Pro

    A CI build window: five pipeline stages as tabs, each with its own numbered log, the failing line marked, a re-run that only queues, common fixes and the build id with Copy.