Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Compact Widget Error Block for React

A dashboard window whose widgets fail on their own: orders that fail twice before loading, revenue from 3 of 5 sources with a details disclosure, a dismissible alert error, a recent errors list, and one Shine Button that retries what failed.

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

Keep one failure from taking the whole screen with this compact widget error window for React with Base UI. It's a dashboard window for Meterhurst, a dashboard tool: a framed, fixed-height window on plus-marked corners made with Guides, with the app's own top bar holding the heading and the one Shine Button, Retry failed (2). Under it a 2 by 2 grid of fixed-size widgets on shared hairlines. Orders failed to load; its Retry fails once more (Failed twice) and the next one loads a figure. Revenue shows a figure from 3 of 5 sources, and a Collapsible Details names the two that are missing; each retry brings one in. Alerts carries an error strip of its own, which can be dismissed and shown again, and Sync is fine. At the foot a list of recent errors with Clear all. Every state keeps its widget's size, so nothing moves when one changes. For any dashboard whose widgets load on their own.

FAQ

Are the retries real, and what stays in the window?

No: they are a script. Each retry shows skeletons for under a second and then follows a typed outcome, so a viewer can run the whole story: Orders fails again once and loads the second time, Revenue gains one source per retry, and after two presses nothing is left to retry. Nothing is requested. In your app, run each widget's own request from run and keep a widget's state in the widget.

What does the count on the button mean?

It is the number of widgets that still have a problem, worked out from their states: Orders until it has loaded, Revenue until all five sources are in. At zero the button stays in place, quiet, and says "Nothing to retry" when pressed, instead of disappearing or moving the bar.

Why does nothing move when a widget changes state?

The window has a fixed height and every widget a fixed size; each state is drawn in the same box, with skeletons at the loaded content's size, and the details disclosure opens inside its widget and scrolls there. Only the grid and the error list scroll, never the page.

How is each widget's state shown without colour?

As a shape and a word in an outline badge: a cross and Failed, a dash and Partial, a tick and Loaded or OK, a spinner and Loading. The one status colour is on the failed Orders icon; every message is in the text colour.

What do Dismiss and Clear all do?

Dismissing the alert strip swaps it for a quiet line with Show again in the same box. Clear all empties the recent errors list and says so; it is quiet and still pressable when the list is empty. Neither saves anything, so a reload brings them back.

What changes on a phone?

The widgets become one column that scrolls inside the window, the top bar keeps the heading and the button, and the recent errors list and the status line stay at the foot.

  • Pro

    Toast Style Error

    In-app errors

    A panel whose body is a toast stage: error cards grouped by cause with a count, Retry and Retry all with a bounded outcome, cards that stay until dismissed, and a real toast raised through the block's own toaster.

  • Pro

    A banner stack in an on-call console window: a critical banner that cannot be dismissed, a warning and an info banner that fold away, and a Dismissed row that restores them, in a window that never changes height.

  • Pro

    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.

  • Pro

    API Uptime Strips Error

    Server and outages

    A full-screen outage page for an API host: the display 503, a notify-me form that saves in the page, and four APIs as rows of thirty day-cells with a shape and a word for today and an uptime counted from the minutes.

  • Pro

    Errors per hour as a row of 24 selectable columns with a line at 60 an hour, the chosen hour's six error groups ranked by count with a Mute and Undo for each, and a sample stack trace for the group you pick.

  • Pro

    401 Unauthorized Error

    Sign-in and identity

    A full-screen 401 page for a reporting workspace: the heading, where the visitor was going, Sign in, and a framed list of other ways in where Single sign-on and Email me a link turn their own row into an email field in place.