Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Maintenance Alert Banner Block for React

A maintenance callout for a managed database service: a warning heading and two sentences over a second band that draws the day as 24 hour cells, with the two hours inside the window filled.

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

A maintenance callout for React with Base UI, for a window when something will be slower or read-only and people want to know exactly when. The top band is a warning icon, a heading that names the window ("02:00 to 04:00 UTC") and two sentences about what pauses. A second band, ruled by the page's own rail marks, draws the day as 24 hour cells: the two hours inside the window are filled, ticks and labels mark 00, 06, 12 and 18, and the window, the read-only time and a status link sit beside it. There is no calendar date, so the notice never goes stale. The warning token is only on the icon; the strip and the text follow your theme. It's built from Guides, with your theme's tokens for every colour. For database and API maintenance, planned downtime, migrations and any notice about a stretch of time.

FAQ

How do I change the window?

Edit WINDOW at the top of the file: start and end are UTC hours, and the strip fills from the start hour up to, not including, the end hour. The range in the heading and beside the strip is built from the same numbers. A window that crosses midnight needs two ranges: split it into two fills or change inWindow.

Why UTC, and what about local time?

A strip drawn in UTC is the same for everyone and can be rendered on the server without a mismatch. To show a visitor's local time, convert the two hours after the first render, never during it, and say which zone you show. Keep UTC in the text so support and customers talk about the same hours.

What do screen readers get from the strip?

The strip is a drawing: it is hidden from assistive technology, and the text beside it says the same thing ("02:00–04:00 UTC", "About 30 minutes read-only"), as does the heading. Nothing in it is a control, so there is nothing to tab through except the status link.

Is the filled window the only sign?

No. The filled cells are in your theme's foreground colour, not a status colour, and the window is also written in the heading and beside the strip. The warning token is on the icon only.

Is it a live region?

No. A planned notice is on the page from the first paint, so it's a section named by its heading, a landmark people can find and skip. If a maintenance notice appears while someone is on the page, put role="status" on an element that is already in the page and fill it when the notice arrives.

How does it fit on a phone?

Both bands stack: the heading and sentences first, then the strip across the full width of the page column with all four tick labels, then the window, the read-only time and the link. At 320 pixels the 24 cells shrink and nothing scrolls sideways; the strip keeps its direction, as a clock does, even in a right-to-left layout.

  • Pro

    An expiry callout for a certificate manager: a framed panel with a warning icon and a Shine Button that renews in place, turning the alert into a success, plus a ghost button that folds it away.

  • Pro

    An in-page info callout for an invoicing app: a card in card with an info icon, a heading, two sentences about a change coming next month, a Shine Button link and a dismiss button that folds the block away.

  • Pro

    A failed-deploy callout for a deploy platform: a band with a failure icon, a heading naming the commit, a Shine Button to retry, and a framed excerpt that quotes the failing lines with the bad one marked.

  • Pro

    A maintenance notice for a hosting provider: a stronger tinted strip with a centred line in full foreground weight, a status dot and a link to the status page.

  • Pro

    Collapsible Details Banner

    Disclosures and tabs

    An incident notice for a status-page product as a disclosure: one summary line with an Investigating badge, and open it explains the incident and lists the four affected services.

  • Pro

    A live-health callout for an API gateway: a green status dot, an all-operational heading, a sentence with the median response time and the one slow minute, a status-page link, and a framed figure of the last 30 minutes as slim latency bars.