Ready-made 404 and error page block with six layouts: minimal, split, search with filterable links, glitch, illustrated, and terminal.
<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.
<x-markas.not-found
variant="split"
title="This page wandered off"
description="We could not find what you were looking for. It may have been renamed or removed."
/>import { NotFound } from "@/components/markas/NotFound";
export default function Example() {
return (
<NotFound
variant="split"
title="This page wandered off"
description="We could not find what you were looking for. It may have been renamed or removed."
/>
);
}<script setup lang="ts">
import NotFound from "@/components/markas/NotFound.vue";
</script>
<template>
<NotFound
variant="split"
title="This page wandered off"
description="We could not find what you were looking for. It may have been renamed or removed."
/>
</template><script lang="ts">
import NotFound from "$lib/components/markas/NotFound.svelte";
</script>
<NotFound
variant="split"
title="This page wandered off"
description="We could not find what you were looking for. It may have been renamed or removed."
/>---
import NotFound from "@/components/markas/NotFound.astro";
---
<NotFound
variant="split"
title="This page wandered off"
description="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.
<x-markas.not-found
variant="search"
description="Try searching for the page, or pick one of the popular pages below."
:links="[
['label' => 'Documentation', 'href' => '/docs'],
['label' => 'Components', 'href' => '/components'],
['label' => 'Pricing', 'href' => '/pricing'],
['label' => 'Changelog', 'href' => '/changelog'],
]"
/>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.
<x-markas.not-found
variant="glitch"
code="500"
title="Something went wrong"
description="Our server hit an unexpected error. Please try again in a moment."
/>import { NotFound } from "@/components/markas/NotFound";
export default function Example() {
return (
<NotFound
variant="glitch"
code="500"
title="Something went wrong"
description="Our server hit an unexpected error. Please try again in a moment."
/>
);
}<script setup lang="ts">
import NotFound from "@/components/markas/NotFound.vue";
</script>
<template>
<NotFound
variant="glitch"
code="500"
title="Something went wrong"
description="Our server hit an unexpected error. Please try again in a moment."
/>
</template><script lang="ts">
import NotFound from "$lib/components/markas/NotFound.svelte";
</script>
<NotFound
variant="glitch"
code="500"
title="Something went wrong"
description="Our server hit an unexpected error. Please try again in a moment."
/>---
import NotFound from "@/components/markas/NotFound.astro";
---
<NotFound
variant="glitch"
code="500"
title="Something went wrong"
description="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.
<x-markas.not-found
variant="illustrated"
title="Lost your way?"
description="The page you followed does not exist. Let us point you back on track."
/>import { NotFound } from "@/components/markas/NotFound";
export default function Example() {
return (
<NotFound
variant="illustrated"
title="Lost your way?"
description="The page you followed does not exist. Let us point you back on track."
/>
);
}<script setup lang="ts">
import NotFound from "@/components/markas/NotFound.vue";
</script>
<template>
<NotFound
variant="illustrated"
title="Lost your way?"
description="The page you followed does not exist. Let us point you back on track."
/>
</template><script lang="ts">
import NotFound from "$lib/components/markas/NotFound.svelte";
</script>
<NotFound
variant="illustrated"
title="Lost your way?"
description="The page you followed does not exist. Let us point you back on track."
/>---
import NotFound from "@/components/markas/NotFound.astro";
---
<NotFound
variant="illustrated"
title="Lost your way?"
description="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.
<x-markas.not-found
variant="terminal"
path="/docs/setup"
description="The command could not find that page. Check the address or head back home."
/>import { NotFound } from "@/components/markas/NotFound";
export default function Example() {
return (
<NotFound
variant="terminal"
path="/docs/setup"
description="The command could not find that page. Check the address or head back home."
/>
);
}<script setup lang="ts">
import NotFound from "@/components/markas/NotFound.vue";
</script>
<template>
<NotFound
variant="terminal"
path="/docs/setup"
description="The command could not find that page. Check the address or head back home."
/>
</template><script lang="ts">
import NotFound from "$lib/components/markas/NotFound.svelte";
</script>
<NotFound
variant="terminal"
path="/docs/setup"
description="The command could not find that page. Check the address or head back home."
/>---
import NotFound from "@/components/markas/NotFound.astro";
---
<NotFound
variant="terminal"
path="/docs/setup"
description="The command could not find that page. Check the address or head back home."
/>Installation
npx markasui@latest add not-foundpnpm dlx markasui@latest add not-foundyarn dlx markasui@latest add not-foundbunx --bun markasui@latest add not-found- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Install the dependency:
npm install alpinejs - Copy the component source below to
resources/views/components/markas/not-found.blade.php.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/NotFound.tsx.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/NotFound.vue.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/lib/components/markas/NotFound.svelte.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/components/markas/NotFound.astro.
- Make sure Tailwind CSS v4 and markas.css are installed. See Installation.
- Copy the component source below to
src/app/markas/not-found.component.ts.
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 callshistory.back()instead. - The split variant shows its illustration beside the text from 36rem wide (container query) and below it on narrow screens.
Props
| Name | Type | Default | Description |
|---|---|---|---|
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. |
code | string | "404" | Status code shown in the visual, such as 403 or 500. |
title | string | "Page not found" | Heading (h1) that names the problem. |
description | string | "The page you are looking for does not exist or has been moved." | Short explanation under the heading. |
homeHref | string | "/" | 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. |
path | string | "/page" | Path typed after cd in the terminal variant. |
homeLabel | string | Back to home | Text of the home link. |
backLabel | string | Go back | Text of the link that goes back in history. |
searchLabel | string | Search pages | Accessible label and placeholder of the search box. |
emptyLabel | string | No pages match your search | Message 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.