shadcn.io is not affiliated with official shadcn/ui
Echoing Numerals 404 Error Block for React
A full-height 404 page for a podcast player where the numerals echo in stacked rows that fade upward, over a framed row of three whole-cell links: go back, browse the library, contact support.
Installation
Overview
Turn the numerals on a 404 into the page's picture, with this echoing 404 block for React with Base UI. Despite its slug, "dark" only names the look it can take: the block has no dark scope and follows your theme, light or dark. It's the not-found page of Duskfall, a podcast player: the page's rails run its full height and one band crosses the screen between two rules with a plus mark at each end. In the band "404" repeats in five stacked rows that fade out upward through a CSS mask, with the heading, one sentence and a Shine Button link home standing under the last, strongest row; the Shine Button is the only colored control. Below, a framed row of three cells on shared hairlines, each a whole-cell link with an icon, a name and one line: Go back, Browse the library and Contact support. On a phone the echo is cut to three rows and the cells stack. It's built from the Shine Button and Guides, with a CSS entrance only. For media apps and any product with a strong voice on its error pages.
FAQ
Is this a dark page?
Only if your theme is. The slug keeps shadcn.io's URL, but nothing here forces a dark background: every surface is a theme token, so it reads the same in light, dark and any preset. The numerals fade through a CSS mask, which works on any background.
How is the echo made, and is it accessible?
It's five 404 spans stacked with a tight line height inside one box with a mask-image gradient that goes from transparent at the top to opaque near the bottom. The box is hidden from assistive technology: the heading says "This page has gone quiet" and the sentence says "Error 404" in words. Edit ECHO to change the number of rows; the first two have max-sm:hidden, which is why a phone shows three.
Why is Go back a plain link?
A page can't know where the visitor came from, and a script that calls the browser's history back can leave a person on another site or on nothing at all. Point "Go back" at the section a lost visitor most likely wanted, or at your home page, and keep browser back for the browser's own button. In this demo all four links go to #.
How do the whole-cell links work?
Each cell is one a that fills its grid cell, so the whole cell is the target, with a solid tint on hover and an inset focus ring so it isn't clipped. The cells sit on shared hairlines: the grid has a gap of one pixel over a border-colored background, and the frame's four plus marks come from Guides. Below the sm breakpoint they stack, each its own full-width row.
What stays local, and does it set the 404 status?
Everything here is local: the page has no state, and its four links go to # until you point them at real routes. It can't set the 404 status either, since a block never sees the request: render it from your framework's not-found route so your server answers with a 404, not a 200 that says "not found". It needs no client code.
Related
- 404Pro
Minimal 404 Error
Not foundA full-height 404 page for a notes app with only the display numerals, a heading, one sentence that names the missing address as typed text, and one link back to the docs.
- 404Pro
Animated Drop-In 404 Error
Not foundA full-height 404 page for a kids' language app where three digit tiles drop onto a rule one after the other with a small overshoot, in CSS only, and a button replays the drop.
- 404Pro
Illustrated Filing Drawer 404 Error
Not foundA full-height 404 page for a bookkeeping app whose picture is the way back: a drawn filing drawer with three folders that are links and one dashed slot for the missing page.
- 404Pro
Split Sitemap 404 Error
Not foundA full-height 404 page for a documentation host: the headline and a link home at the start, the whole site's sitemap as a keyboard-walkable tree at the end, with a divider between.
- Pro
Page History Trail 404 Error
Not foundA full-height 404 page for a design-review tool that shows the trail of pages you visited on a rail-to-rail rule, tags the last good page, and lets you clear and restore the trail.
- Pro
Search Command 404 Error
Not foundA full-height 404 page for a knitting-pattern library: the display 404, a heading that names the missing address, an inline command list in a framed panel that shows five popular pages and filters ten as you type, and one button to the homepage.