shadcn examples svg logo
487

Command Palette

Search for a command to run...

Sign inGet All Access

Shadcn Error Pages

Error Page is a full-page block for communicating issues like missing content, server errors, or restricted access. It centers a status message with Shadcn UI components and Tailwind styling, keeping the tone friendly while offering a way back to the main app. Use it as a React 404 or 503 page, or drop in the Vuejs or Svelte version.

Pro
Error Pages preview
Get Unlimited Access to All Examples & Blocks.
Unlock everything with a single payment. Get lifetime access to all content. You will also receive free access to all new examples.

Error Pages Explained

An error page is the screen a visitor sees when something goes wrong: the URL does not exist, the server is temporarily down, or access is restricted. It is often the least designed page in a product and one of the most seen. This block gives those moments a proper design: a centered status message built with Shadcn UI components and Tailwind typography, a friendly explanation, and a prominent route back to safety.

The example is currently marked as coming soon and shows a placeholder in its preview while the page set is completed. The scope is fixed: full-page blocks covering the common HTTP failure screens, styled to match the rest of your application.

Covering 404, 503, and Access Errors

The 404 not found page handles broken links and mistyped URLs, and its job is orientation: say the page does not exist and offer the homepage or search. The 503 service unavailable page covers maintenance and outages, where tone matters most, closely related to a coming soon page in spirit but honest about the interruption. Restricted access screens round out the set for content behind permissions.

These pages pair naturally with empty states: both patterns explain an absence, and using them together gives your product one consistent voice for every screen that cannot show what the user wanted.

Technology and Theming Choices

The pages are built with React, styled with Tailwind utilities, and composed from Shadcn UI components, keeping them dependency-light since an error page must load reliably precisely when things are failing. Layout centers the message with generous whitespace, and the action button uses your standard button component.

Colors flow from the design tokens in globals.css: foreground for the status headline, muted-foreground for the explanation, and the primary variable for the action. Dark and light mode both work automatically, so a user browsing at night is not flashed with a white error screen.

Wiring the Pages Into Your Router

On release, install through the shadcn CLI command at the top of the example page, available in npm, pnpm, yarn, and bun forms, or copy the markup from the code tab. This is a pro example, so the code view and CLI install come with an All Access plan.

In Next.js, the 404 becomes your not-found file and the error variants plug into error boundaries; in other routers they register as catch-all and error routes. The pages ship in React, Vuejs, and Svelte versions, with the Vuejs and Svelte editions built on the shadcn-vue and shadcn-svelte ports, so every stack can fail gracefully with the same design.

Frequently Asked Questions

Is the error pages block released?
Not yet. It is flagged as coming soon with a placeholder preview. The category page is live and the full set will appear there when development wraps up.
Which error types will be included?
The set targets the screens products actually need: 404 not found, 503 service unavailable, and restricted access. Each follows the same visual pattern so your failure states feel consistent.
How do I use these as Next.js error boundaries?
Place the 404 layout in your not-found file and the failure layouts in error files within the App Router. Because the blocks are plain React components, they drop into those conventions without modification.
Can I change the illustration or message tone?
Yes. The headline, description, and action are ordinary JSX, and colors come from your CSS variables. Swapping copy, adding an illustration, or pointing the button somewhere else are direct edits.
Do the error pages support dark mode?
They do. All colors reference Shadcn UI tokens, so the pages follow your theme class automatically and stay comfortable to read in both light and dark environments.