Blocks
v1.0.0Added in 1.0.0
Five error screens in one block: not found, server error, scheduled maintenance, offline and no permission, full page or inside a shell.
The illustration rises in and the 404 compass needle swings and settles once; everything else fades up in order when the page mounts on the client (reduced motion keeps only short fades). 404: "Back to the home page" and "Go back" (history back, or home without history); the search focuses with / and Enter searches (a live region says what is being searched); the four suggestion cards are links that lift on hover and press in on tap. 500: "Try again" spins while it checks; a failed try shows a red alert with the time, the error id copies with one click ("Copied"), and "Technical details" opens the time, the path and the stack trace (the code block scrolls sideways on phones and has its own copy button). Maintenance: a live countdown to the end with the return date under it, the status page and support links, a 30 day uptime bar (hover, tap or arrow keys read each day) and "Notify me", an email field that validates when you leave it and ends in a confirmation; when the countdown reaches zero the page says "Maintenance is over" and the primary action becomes "Reload". Offline: an automatic retry every retryInterval seconds with a thin progress bar and "Trying again in 8 s", "Try now" at any time; the browser's online event retries at once, draws the cloud's slash away, says "You are back online" and then reloads (or calls onReconnect); pages saved on the device stay one tap away. Forbidden: "Request access" opens a dialog (a bottom sheet on phones) with an admin picker and a reason of at least 10 characters; submitting empty shows both errors, a valid request closes it, the button turns into a disabled "Request sent · 4:42 PM" and a green confirmation takes focus; "Switch account" signs out, and the signed-in account is shown. State changes are announced politely, never every second; the title takes focus when the page is reached by navigation.
npx wingo-ui@latest add error-pagesPro item: the CLI needs a Pro account. See plans