The status, a short apology, and buttons back and home.

Last updated

Open page
Show code
---
/**
 * Simple: The status, a short apology, and buttons back and home.
 *
 * @page not-found
 */
import NotFound from '@/components/apogee/sections/NotFound/NotFound.astro'
---

<NotFound fullHeight back="Go back" code="404 error" heading="We can't find that page" description="Sorry, the page you are looking for doesn't exist or has been moved." primaryAction={{ label: 'Take me home', href: '/' }} />

Add

npx @ava-ui/apogee add not-found/simple

This copies the page to src/components/apogee/pages/not-found/ with everything it uses: NotFound. Render it from src/pages/404.astro, or use Copy code above.

Accessibility

  • The page heading is the h1.
  • “Go back” returns to the previous page (or home when the page was opened directly). It needs JS, so it hides without it; “Take me home” always works.