Skip to main content

Error Pages

Standard enterprise error pages — 404 Not Found and 500 Server Error. Both include a brief message and a clear route back to safety.

When to use this recipe​

Use these for application-level routing errors, API failure states at the page level, and permission-denied screens. Drop into your router's error boundary or fallback route.

Components used​

Button · Card

Preview · Error Pages

Code​

<!-- 404 -->
<div style="text-align:center;padding:5rem 2rem">
<div style="font-size:5rem;font-weight:800;color:var(--muted-foreground);line-height:1;margin-bottom:1rem">404</div>
<h2>Page not found</h2>
<p style="color:var(--muted-foreground);max-width:320px;margin-inline:auto">
The page you are looking for does not exist or has been moved.
</p>
<div class="hstack" style="justify-content:center;gap:0.75rem;margin-top:1.75rem">
<button class="outline" onclick="history.back()">Go back</button>
<a href="/dashboard"><button>Go to dashboard</button></a>
</div>
</div>

<!-- 500 -->
<div style="text-align:center;padding:5rem 2rem">
<div style="font-size:5rem;font-weight:800;color:var(--danger);line-height:1;margin-bottom:1rem">500</div>
<h2>Something went wrong</h2>
<p style="color:var(--muted-foreground);max-width:320px;margin-inline:auto">
An unexpected error occurred. Our team has been notified.
</p>
<div class="hstack" style="justify-content:center;gap:0.75rem;margin-top:1.75rem">
<button class="outline" onclick="location.reload()">Try again</button>
<a href="/dashboard"><button>Go to dashboard</button></a>
</div>
</div>