Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

API Uptime Strips Error Block for React

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.

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 developers what actually broke and for how long, with this API down error for React with Base UI. It's a whole screen: the page's two side rails run its full height and one band crosses it between two rules with a plus mark where each meets a rail. At the start of the band the display "503" sits over the headline and one sentence, and at the end a Field with an Input takes an email address for "Tell me when it's back"; the Shine Button Notify me is the only colored control. Under them four APIs are ruled rows, each with a name, a shape and a word for today (a solid square for operational, an outline triangle for degraded, a cross for down), an uptime counted from the same typed minutes, and thirty day-cells: a short bar for a clean day, a taller one for a partial outage and the tallest for a day of an hour or more. Hovering or focusing a day reads its note under the rows, and the arrow keys move between days. The band's rules come from Guides, and the entrance is CSS only. For an API, a GraphQL host or any developer platform.

FAQ

What happens when I press Notify me, and how do I wire it?

Nothing leaves the page. Pressing it checks the address (an empty or malformed one gets a sentence under the field and focus), waits 700 ms behind a spinner, and swaps the form for "Noted, in this demo" with the address you typed and a Change address button that brings the form back with your text in it. A polite status message says no email will be sent. To wire it, post the address to your status provider or subscriber list where the code says so, keep the busy state until it answers, and show its error under the field when it refuses.

How do I fill the strips with real incidents?

Edit APIS. Each API lists its incidents as a day place (0 is the oldest of thirty, 29 is today) and the minutes of errors that day; a day with no entry is clean. LAST_DAY is the strip's last date, written out so the server and every visitor's time zone agree, and a day counts as partial under DOWN_FROM minutes and as down from it. The uptime is 100 - minutes / (30 * 1440) * 100, so it always agrees with the bars.

How can you tell a good day from a bad one without color?

By height, weight and words. A clean day is a short, light bar, a partial outage is taller and darker, and a day of an hour or more is the tallest and solid. Today's state is a shape and a word beside the API's name, and the day's note names the minutes, so the page reads the same in grayscale, in dark mode and for people who can't tell red from green. The page uses no status color at all.

Is the strip usable with a keyboard and a screen reader?

The 120 days are one tab stop. The left and right arrow keys move along an API's days, the up and down arrow keys move to the same day of the next API, and Home and End jump to the ends of a row. Every day is a named button ("Oct 14, Query API: 1 hour 45 minutes of errors"), so a screen reader reads the note on focus; the readout under the rows repeats it for sighted users and is hidden from assistive technology. On a touch screen, tap a day to read it.

Should an outage page return a 503?

Yes. Serve the page with a 503 status, and add a Retry-After header with the number of seconds (or a date) when you can give an honest estimate, so browsers, crawlers and API clients know the outage is temporary and when to come back. A 200 with this page on it tells search engines the outage is your content, and a 404 tells them the address is gone. The block can't set the status; your server or framework does.

How does it look on a phone?

The headline and the form stack, with the form first so Notify me is on the first screen, and each API becomes a name with its uptime on one line and the thirty cells filling the width below it. The sentence that explains the bars is hidden from sight but still read aloud, and the rest holds from 320 px up.

  • Pro

    Services Status Error

    Server and outages

    A hosting platform's status as one framed panel: six services with a shape and a word for each state, a summary counted from them, an Affected only filter that holds the panel's height, and a Refresh status button.

  • Pro

    A full-screen page for one failing service in a marketplace: a framed map of five services joined by hairlines, a radio group that opens each service's panel, and a list of what still works counted from the dependencies.

  • Pro

    A full-screen page for a database that refuses connections: Retry now and a switch that retries by itself on a press-started countdown, four pool cells and the backoff schedule drawn to scale.

  • Pro

    A full-screen page for a live connection that dropped and fell back: three signal bars, three transport rows with a shape and a word each, Reconnect now as a short scripted attempt, and a Keep using polling toggle.

  • Pro

    A services callout for a cloud platform: a green dot and a heading that counts "All 12 of 12 services operational" from the data, a status-page link, and a matrix of the twelve services on shared hairlines.

  • Pro

    Region Status Footer

    Trust and compliance

    A split footer for a webhook-relay API: a subscribe-to-updates popover at the start, a framed figure of three regions with latency and thirty-day bars at the end.