shadcn.io is not affiliated with official shadcn/ui
404 With Address Guesses Error Block for React
A 404 page for a shipping dashboard that offers three guesses as radio rows, each showing its address with the changed part struck through or underlined and named in a word, and one button that opens the chosen guess.
Installation
Overview
Show where a missing page probably went, and how its address changed, with this 404 page for React with Base UI. It's the not-found page of Parcelgate, a shipping dashboard: the page's two side rails run its full height, and one band crosses the screen between two rules with a plus mark where each meets a rail. Under the display "404" and the heading, three ruled rows are native radio buttons, each with the reason for the guess, a Badge naming the change (Moved, Up one level, Archived) and the address it leads to, with the part that went struck through and the part that is new underlined. Choosing a row changes the one Shine Button under the rows, the only colored control, to open that address. It's built from Badge, Shine Button and Guides, with a CSS entrance only. For apps whose pages move between sections, or are archived with their old addresses.
FAQ
How is the difference between addresses shown?
Each guess is typed as parts of its address, each a kept part, a part that went or a part that is new. A part that went is struck through, a new part is underlined, and the badge names the whole change in a word, so none of it depends on color. Screen readers hear "Gone:" and "New:" before those parts, and a sentence after the row says what changed.
Are the rows real radio buttons?
Yes: native radio inputs inside a radio group, the same on every target. Tab lands on the group once, the arrow keys move between the guesses and choose as they go, and the first guess is chosen to begin with. The whole row is the label, so clicking anywhere on it chooses it, and the chosen row gets a tint and a filled dot.
What does the button do?
It is a link whose words follow the choice ("Open" and the address in monospace), and a polite status message says the button now opens that address. In this demo it points at # and goes nowhere. Point its href at the chosen guess's address, which addressOf builds from the parts.
Where do the guesses come from?
From the typed Guess objects at the top of the file: a reason, a word for the change, the parts of the address and a sentence for screen readers. In your app build them from your redirect rules, a search of old addresses or the segments of the failed path: drop the last part, drop a section that moved, or swap it for the archive.
Related
- Pro
404 With Ranked Results Error
Not foundA split 404 page for a developer blog host: the failed address in an editable field with its words as chips, and eight typed articles ranked by shared words with one letter of typo allowed, the matched words marked, re-ranking as you edit.
- 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.
- Pro
Record Not Found Error
Not foundA split 404 page for an order desk: an inset frame that says what was asked for (the kind, the id and the result), and a lookup by kind and number over six typed records that finds the record or names the nearest number.
- 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.