Error, server error


Install
npx shadcn add @klarhimmel/error-statusDetailsAbout, usage, props and more
A 500-style page for when it is our fault: plain apology, retry and status actions, and a side panel with a copyable reference id for support plus up to three things to…
Import
Import
- error/status
- About
- A 500-style page for when it is our fault: plain apology, retry and status actions, and a side panel with a copyable reference id for support plus up to three things to try.
- Category
- Not found, server error and maintenance pages. New project? Set it up once: /get-started/installation.
Notes
When to use it
A 500-style page for when the fault is ours, with retry and status actions and a side panel holding a copyable reference id. For a simple dead link use error-page.
Writing for it
- The reference holds 40 characters, with a copy button beside it. Write a real example id format so support staff can recognise it. - Tips hold 120 characters each, up to 3. Give actions the reader can take, such as retrying in a minute. - Primary and secondary are two links, usually Try again and Status page. The title is the h1 and holds 100 characters.
Watch out for
The reference id uses break-all, so a long id wraps mid-string. With no tips the tips heading is hidden too, and the reference label stays.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
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.
| Prop | Type | Default | Description |
|---|---|---|---|
code | string | '500' | Text, up to 20 characters. |
title | string | 'Say what went wrong in plain words' | Text, up to 100 characters. |
description | string | 'Say in two sentences that you know …' | Text, up to 300 characters. |
primary | Link | {…} | See the type. |
secondary | Link | {…} | See the type. |
referenceLabel | string | 'Name the reference code' | Text, up to 40 characters. |
reference | string | 'AAA-0000-0000' | Text, up to 40 characters. |
tipsTitle | string | 'Say what to try' | Text, up to 60 characters. |
tips | string[] | 3 items | List of up to 3. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |