Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Not Found

    Ready-made 404 and error page block with six layouts: minimal, split, search with filterable links, glitch, illustrated, and terminal.

    Page not found

    The page you are looking for does not exist or has been moved.

    Page not found

    The page you are looking for does not exist or has been moved.

    Page not found

    The page you are looking for does not exist or has been moved.

    Page not found

    The page you are looking for does not exist or has been moved.

    Page not found

    The page you are looking for does not exist or has been moved.

    <x-markas.not-found
    />
    import { NotFound } from "@/components/markas/NotFound";
    
    export default function NotFoundExample() {
      return <NotFound />;
    }
    <script setup lang="ts">
    import NotFound from "@/components/markas/NotFound.vue";
    </script>
    
    <template>
      <NotFound />
    </template>
    <script lang="ts">
      import NotFound from "$lib/components/markas/NotFound.svelte";
    </script>
    
    <NotFound />
    ---
    import NotFound from "@/components/markas/NotFound.astro";
    ---
    
    <NotFound />
    import { Component } from "@angular/core";
    import { NotFound } from "./markas/not-found.component";
    
    @Component({
      selector: "markas-example",
      imports: [NotFound],
      template: ` <markas-not-found /> `,
    })
    export default class NotFoundExample {}

    Examples

    Split with illustration

    This page wandered off

    We could not find what you were looking for. It may have been renamed or removed.

    This page wandered off

    We could not find what you were looking for. It may have been renamed or removed.

    This page wandered off

    We could not find what you were looking for. It may have been renamed or removed.

    This page wandered off

    We could not find what you were looking for. It may have been renamed or removed.

    This page wandered off

    We could not find what you were looking for. It may have been renamed or removed.

    Search and popular pages

    Page not found

    Try searching for the page, or pick one of the popular pages below.

    Page not found

    Try searching for the page, or pick one of the popular pages below.

    Page not found

    Try searching for the page, or pick one of the popular pages below.

    Page not found

    Try searching for the page, or pick one of the popular pages below.

    Page not found

    Try searching for the page, or pick one of the popular pages below.

    Glitch

    Something went wrong

    Our server hit an unexpected error. Please try again in a moment.

    Something went wrong

    Our server hit an unexpected error. Please try again in a moment.

    Something went wrong

    Our server hit an unexpected error. Please try again in a moment.

    Something went wrong

    Our server hit an unexpected error. Please try again in a moment.

    Something went wrong

    Our server hit an unexpected error. Please try again in a moment.

    Illustrated

    Lost your way?

    The page you followed does not exist. Let us point you back on track.

    Lost your way?

    The page you followed does not exist. Let us point you back on track.

    Lost your way?

    The page you followed does not exist. Let us point you back on track.

    Lost your way?

    The page you followed does not exist. Let us point you back on track.

    Lost your way?

    The page you followed does not exist. Let us point you back on track.

    Terminal

    $ cd /docs/setup

    404: Page not found

    The command could not find that page. Check the address or head back home.

    $ cd /docs/setup

    404: Page not found

    The command could not find that page. Check the address or head back home.

    $ cd /docs/setup

    404: Page not found

    The command could not find that page. Check the address or head back home.

    $cd /docs/setup

    404: Page not found

    The command could not find that page. Check the address or head back home.

    $ cd /docs/setup

    404: Page not found

    The command could not find that page. Check the address or head back home.

    Installation

    npx markasui@latest add not-found

    Usage

    <x-markas.not-found />
    
    <x-markas.not-found
        variant="search"
        :links="[
            ['label' => 'Documentation', 'href' => '/docs'],
            ['label' => 'Pricing', 'href' => '/pricing'],
        ]"
    />
    
    <x-markas.not-found variant="glitch" code="500" title="Something went wrong" />

    Needs Alpine.js for Go back and the search filter.

    import { NotFound } from "@/components/markas/NotFound";
    
    <NotFound />
    <NotFound
      variant="search"
      links={[
        { label: "Documentation", href: "/docs" },
        { label: "Pricing", href: "/pricing" },
      ]}
    />
    <NotFound variant="glitch" code="500" title="Something went wrong" />
    <script setup lang="ts">
    import NotFound from "@/components/markas/NotFound.vue";
    
    const links = [
      { label: "Documentation", href: "/docs" },
      { label: "Pricing", href: "/pricing" },
    ];
    </script>
    
    <template>
      <NotFound />
      <NotFound variant="search" :links="links" />
      <NotFound variant="glitch" code="500" title="Something went wrong" />
    </template>
    <script lang="ts">
      import NotFound from "$lib/components/markas/NotFound.svelte";
    </script>
    
    <NotFound />
    <NotFound variant="search" {links} />
    <NotFound variant="glitch" code="500" title="Something went wrong" />
    ---
    import NotFound from "@/components/markas/NotFound.astro";
    ---
    
    <NotFound />
    <NotFound variant="search" links={links} />
    <NotFound variant="glitch" code="500" title="Something went wrong" />

    Go back and the search filter use one small bundled script per page.

    import { Component } from "@angular/core";
    import { NotFound } from "./markas/not-found.component";
    
    @Component({
      selector: "app-not-found-page",
      imports: [NotFound],
      template: `
        <markas-not-found />
        <markas-not-found variant="search" [links]="links" />
        <markas-not-found
          variant="glitch"
          code="500"
          title="Something went wrong"
        />
      `,
    })
    export class NotFoundPage {
      links = [
        { label: "Documentation", href: "/docs" },
        { label: "Pricing", href: "/pricing" },
      ];
    }
    • The block renders an h1, so use it as the main content of the error page.
    • Go back is a link to homeHref. With browser history it calls history.back() instead.
    • The split variant shows its illustration beside the text from 36rem wide (container query) and below it on narrow screens.

    Props

    NameTypeDefaultDescription
    variant"minimal" | "split" | "search" | "glitch" | "illustrated" | "terminal""minimal"Layout. minimal: big code above the text. split: text left, geometric SVG right from 36rem wide. search: search box over filterable links. glitch: code with a CSS glitch. illustrated: stacked outline code with a compass. terminal: shell window.
    codestring"404"Status code shown in the visual, such as 403 or 500.
    titlestring"Page not found"Heading (h1) that names the problem.
    descriptionstring"The page you are looking for does not exist or has been moved."Short explanation under the heading.
    homeHrefstring"/"Target of the home link, and of the Go back link when there is no history.
    links{ label, href }[][]Popular pages. Shown and filtered in the search variant.
    pathstring"/page"Path typed after cd in the terminal variant.
    homeLabelstringBack to homeText of the home link.
    backLabelstringGo backText of the link that goes back in history.
    searchLabelstringSearch pagesAccessible label and placeholder of the search box.
    emptyLabelstringNo pages match your searchMessage announced when the search finds nothing.

    Accessibility

    • The block is a section labelled by its h1 title. The decorative code, illustration, and glitch layers are aria-hidden.
    • Go back is a real link to homeHref: with JavaScript and history it calls history.back(), otherwise it simply goes home.
    • The search box has an accessible label; the empty result message sits in a role=status live region.
    • The glitch layers are hidden and the cursor stops blinking with prefers-reduced-motion.

    Related components

    More sections components with the same classes in every framework.