Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Illustrated Filing Drawer 404 Error Block for React

A 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.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Make the picture on your 404 page do some work, with this illustrated 404 block for React with Base UI. It's the not-found page of Penstack, a bookkeeping app for freelancers: 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 the copy comes first, with the numerals, the heading, one sentence, a Shine Button link back to the books and an outline Button link to search. Beside it, first on wide screens, a drawn filing drawer sits in a Frame inset: three labelled folders (Invoices, Clients, Reports) stand in it as real links that lift a little on hover and keyboard focus, and one dashed slot with a magnifier says "This one is gone". On a phone the drawing sits under the actions and is shorter. It's built from Frame, Shine Button, Button and Guides, with CSS only. For any app with a few top-level places to send a lost visitor.

FAQ

Does this page set the 404 status?

No, a block can't: your server sends the status. Render the page from your framework's not-found route so the response is a real 404, not a 200 that says "not found". The link to search and the folders are for people; the status is for crawlers and caches.

Where do the links go?

Nowhere in this demo: all five are links to #. Point the two buttons and each folder at a real route. The buttons are Shine Button and Button with render set to an a element and nativeButton={false}. The folders are plain a elements in a list inside a named nav.

How do I change the folders?

Edit the FolderLink rows in the drawer: each takes a label. The dashed slot is a separate GoneSlot placed third, where the missing page stood; move it, or drop it if you have no particular page to point at. The grid is four across, so three folders and the slot fill it; for more, widen the grid and shorten the labels, which truncate on a narrow phone.

Is the drawing accessible?

The folders are real links with their names as text, in a nav called "Penstack folders", and the slot's words are read as text, so nothing important lives only in the picture. The drawer's front, the handle and the tabs are decoration and hidden from assistive technology. Each folder has a visible focus ring, and it lifts on focus as it does on hover.

What moves, and what about reduced motion?

Only the lift: a folder rises 8 px on hover or focus, and the copy fades up once on load. With reduced motion the folder doesn't move at all (its tint still changes) and nothing fades in.

How does it look on a phone?

The copy comes first so the way back is on the first screen, with the two links stacked or side by side as they fit. The drawing follows under them, four across with shorter folders and slightly smaller labels, so the whole page stays about one screen tall.

  • Pro

    A 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.

  • Pro

    A 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

    A 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.

  • Pro

    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.

  • Pro

    A 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

    A 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.