Vue templateFree

404 Not Found Page

Friendly Vue 3 404 page with a drawn compass illustration, live search suggestions and helpful links, plus a compact 500 error variant. Tailwind CSS.

by Vueplayv1.0.0Updated 2 hours ago

Install
Full screen ↗

About this template

A 404 page that helps visitors recover instead of leaving: it shows the path they tried so typos are obvious, offers a search box with instant suggestions, and lists the four places people most often want to go next. The illustration is inline SVG, with a compass needle that gently spins (and stays still for people who prefer reduced motion).

A second, compact 500 variant covers server errors: a short honest message, a Try again button that emits retry, a link to your status page and a copyable error reference for support tickets. The demo switches between them with an accessible tab control; in your app, render the matching component from your router's error handling.

Customise the links, the searchable pages and the error ID through props on NotFound and ServerError. The accent is amber and every colour has a dark mode counterpart.

  • Drawn 404 illustration with a reduced-motion-aware animation
  • Search box with instant page suggestions
  • Helpful links grid and back-to-home link
  • Compact 500 variant with retry, status link and copyable error ID
  • Light and dark mode

Code

13 files in the repo
<script setup lang="ts">
import { ref } from 'vue'
import NotFound from './components/NotFound.vue'
import ServerError from './components/ServerError.vue'

type ErrorView = '404' | '500'
const view = ref<ErrorView>('404')
const views: ErrorView[] = ['404', '500']

// Tabs keyboard pattern: arrows move between tabs.
function onKeydown(e: KeyboardEvent) {
  if (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight') return
  const i = views.indexOf(view.value)
  view.value = views[(i + (e.key === 'ArrowRight' ? 1 : views.length - 1)) % views.length]!
  const list = e.currentTarget as HTMLElement
  requestAnimationFrame(() => list.querySelector<HTMLElement>('[aria-selected="true"]')?.focus())
}
</script>

<template>
  <div class="relative min-h-screen bg-gray-50 dark:bg-gray-950">
    <div aria-hidden="true" class="pointer-events-none absolute inset-x-0 top-0 h-96 bg-gradient-to-b from-amber-100/70 to-transparent dark:from-amber-500/10" />

    <header class="relative mx-auto flex max-w-5xl items-center justify-between px-5 py-5">
      <a href="#" class="flex items-center gap-2 rounded-lg font-semibold text-gray-900 focus-visible:outline-2 focus-visible:outline-amber-500 dark:text-white">
        <span class="grid size-8 place-items-center rounded-lg bg-amber-500 text-gray-950" aria-hidden="true">
          <svg viewBox="0 0 24 24" class="size-4" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M4 18L12 4l8 14H4z" /></svg>
        </span>
        Wayfarer
      </a>
      <!-- Preview switcher: in your app, render the matching component from your router's error handling. -->
      <div role="tablist" aria-label="Error page variant" class="flex rounded-lg bg-white p-0.5 text-xs font-semibold shadow-sm ring-1 ring-gray-200 dark:bg-white/5 dark:ring-white/10" @keydown="onKeydown">
        <button
          v-for="v in views"
          :id="`tab-${v}`"
          :key="v"
          type="button"
          role="tab"
          :aria-selected="view === v"
          :aria-controls="`panel-${v}`"
          :tabindex="view === v ? 0 : -1"
          class="rounded-md px-3 py-1.5 transition focus-visible:outline-2 focus-visible:outline-amber-500"
          :class="view === v ? 'bg-amber-500 text-gray-950' : 'text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white'"
          @click="view = v"
        >{{ v === '404' ? '404 Not found' : '500 Error' }}</button>
      </div>
    </header>

    <main :id="`panel-${view}`" role="tabpanel" :aria-labelledby="`tab-${view}`" class="relative">
      <NotFound v-if="view === '404'" />
      <ServerError v-else />
    </main>
  </div>
</template>
All error pages →
Preview of Admin Dashboard$29

Template · Dashboards

Admin Dashboard

A complete Vue 3 admin dashboard template with a collapsible sidebar, hand-drawn SVG charts, a sortable customers table and settings. Tailwind CSS, dark mode.

by Vueplay
Preview of Analytics DashboardFree

Template · Dashboards

Analytics Dashboard

Web analytics dashboard template for Vue 3 and Tailwind CSS: SVG area chart, metric tabs, top pages, sources, a devices donut and a date range picker.

by Vueplay
Preview of App LandingFree

Template · Landing pages

App Landing

Vue 3 landing page for a mobile app with a CSS-drawn phone mockup, feature highlights, a screenshot strip and download buttons. Tailwind CSS, dark mode.

by Vueplay
Preview of Auth PagesFree

Template · Auth pages

Auth Pages

Sign in, sign up and forgot-password screens in Vue 3 with a split brand panel, inline validation and a password visibility toggle. Tailwind CSS, dark mode.

by Vueplay

Pro feature

Upgrade to Pro

Upgrade to unlock more of Vueplay. Cancel any time.

  • Custom domains with HTTPS
  • Private projects
  • No "Made with Vueplay" badge
  • GitHub sync

$120/year

Compare plansBilling settings