Skip to content
Klarhimmel UI

Error, maintenance

Error, maintenance previewError, maintenance preview

Install

npx shadcn add @klarhimmel/error-maintenance
DetailsAbout, usage, props and more

A planned-downtime page: a status pill, headline, when we are back, and a short log of timed updates. Centred, calm, no error code. Empty updates hide the log.

Import

Import

import Block from '@/components/klarhimmel/blocks/error-maintenance';
Also called
  • error/maintenance
Category
Not found, server error and maintenance pages. New project? Set it up once: /get-started/installation.

Notes

When to use it

A planned-downtime page with a status pill, a back-at time and a short log of updates. For an unplanned fault use error-status.

Writing for it

- Status holds 40 characters and the back line 80. Write an actual time and time zone, because that is the answer the reader came for. - Updates take a time of 20 characters and a text of 140, up to 4 entries. Newest first reads best, since the list is not sorted. - The description holds 300 characters. Say what is affected and what is safe, for example that existing bookings are unchanged.

Watch out for

When updates is empty the log card and its heading are removed in the published page. The status pill and the contact link also vanish when their fields are empty.

Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import ErrorMaintenance from '@/components/klarhimmel/blocks/error-maintenance';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <ErrorMaintenance props={{
          "status": "Name what is happening",
          "title": "Say what is being worked on",
          "description": "Say in two sentences what is paused, that what exists is safe, and that nothing needs doing on their side.",
          "back": "Say when it will be back",
          "updatesTitle": "Name the updates",
          "updates": [
            {
              "time": "00:00",
              "text": "Say what happened at this time"
            },
            {
              "time": "00:00",
              "text": "Say what happened at this time"
            },
            {
              "time": "00:00",
              "text": "Say what happened at this time"
            }
          ],
          "contact": {
            "label": "Say who to contact if urgent",
            "href": "tel:+46000000000"
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}

Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

PropTypeDefaultDescription
statusstring'Name what is happening'Text, up to 40 characters.
titlestring'Say what is being worked on'Text, up to 100 characters.
descriptionstring'Say in two sentences what is paused…'Text, up to 300 characters.
backstring'Say when it will be back'Text, up to 80 characters.
updatesTitlestring'Name the updates'Text, up to 60 characters.
updates{ time, text }[]3 itemsList of up to 4. Each item: time, text.
contactLink{…}See the type.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.