Lewati ke konten
MarkasUI
Ketik untuk mencari

    Panduan

    MarkasUI

    Form

    Feedback

    Overlay

    Navigasi

    Data

    Section

    Animasi

    Latar

    Tombol

    Template

    Halaman

    Not Found

    Blok halaman 404 dan error siap pakai dengan enam tata letak: minimal, terbagi, pencarian dengan tautan tersaring, glitch, berilustrasi, dan 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 {}

    Contoh

    Terbagi dengan ilustrasi

    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.

    Pencarian dan halaman populer

    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.

    Berilustrasi

    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.

    Instalasi

    npx markasui@latest add not-found

    Pemakaian

    <x-markas.not-found
        title="Halaman tidak ditemukan"
        description="Halaman yang kamu cari tidak ada atau sudah dipindahkan."
        home-label="Kembali ke beranda"
        back-label="Kembali"
    />
    
    <x-markas.not-found
        variant="search"
        search-label="Cari halaman"
        empty-label="Tidak ada halaman yang cocok"
        :links="[
            ['label' => 'Dokumentasi', 'href' => '/docs'],
            ['label' => 'Harga', 'href' => '/harga'],
        ]"
    />

    Butuh Alpine.js untuk Kembali dan penyaring pencarian.

    import { NotFound } from "@/components/markas/NotFound";
    
    <NotFound
      title="Halaman tidak ditemukan"
      description="Halaman yang kamu cari tidak ada atau sudah dipindahkan."
      homeLabel="Kembali ke beranda"
      backLabel="Kembali"
    />
    <NotFound
      variant="search"
      searchLabel="Cari halaman"
      emptyLabel="Tidak ada halaman yang cocok"
      links={[
        { label: "Dokumentasi", href: "/docs" },
        { label: "Harga", href: "/harga" },
      ]}
    />
    <script setup lang="ts">
    import NotFound from "@/components/markas/NotFound.vue";
    
    const links = [
      { label: "Dokumentasi", href: "/docs" },
      { label: "Harga", href: "/harga" },
    ];
    </script>
    
    <template>
      <NotFound
        title="Halaman tidak ditemukan"
        description="Halaman yang kamu cari tidak ada atau sudah dipindahkan."
        home-label="Kembali ke beranda"
        back-label="Kembali"
      />
      <NotFound
        variant="search"
        search-label="Cari halaman"
        empty-label="Tidak ada halaman yang cocok"
        :links="links"
      />
    </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 dan filter pencarian memakai satu script kecil yang dibundel per halaman.

    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" },
      ];
    }
    • Blok ini merender h1, jadi pakai sebagai isi utama halaman error.
    • Kembali adalah link ke homeHref. Bila ada riwayat browser, ia memanggil history.back().
    • Variant split menampilkan ilustrasi di samping teks mulai lebar 36rem (container query) dan di bawahnya di layar sempit.

    Props

    NamaTipeDefaultKeterangan
    variant"minimal" | "split" | "search" | "glitch" | "illustrated" | "terminal""minimal"Tata letak. minimal: kode besar di atas teks. split: teks kiri, SVG geometris kanan mulai lebar 36rem. search: kotak cari di atas tautan yang bisa disaring. glitch: kode dengan efek glitch CSS. illustrated: kode outline bertumpuk dengan kompas. terminal: jendela shell.
    codestring"404"Kode status di visual, misalnya 403 atau 500.
    titlestring"Page not found"Judul (h1) yang menyebut masalahnya.
    descriptionstring"The page you are looking for does not exist or has been moved."Penjelasan singkat di bawah judul.
    homeHrefstring"/"Tujuan link beranda, juga link Kembali bila tidak ada riwayat.
    links{ label, href }[][]Halaman populer. Tampil dan bisa disaring di variant search.
    pathstring"/page"Path yang diketik setelah cd di variant terminal.
    homeLabelstringBack to homeTeks link beranda. Isi "Kembali ke beranda" untuk situs berbahasa Indonesia.
    backLabelstringGo backTeks link kembali di riwayat. Isi "Kembali" untuk situs berbahasa Indonesia.
    searchLabelstringSearch pagesLabel aksesibel dan placeholder kotak cari. Isi "Cari halaman" untuk situs berbahasa Indonesia.
    emptyLabelstringNo pages match your searchPesan yang diumumkan saat pencarian kosong. Isi "Tidak ada halaman yang cocok" untuk situs berbahasa Indonesia.

    Aksesibilitas

    • Blok berupa section yang diberi label oleh judul h1. Kode dekoratif, ilustrasi, dan lapisan glitch memakai aria-hidden.
    • Kembali adalah link sungguhan ke homeHref: dengan JavaScript dan riwayat ia memanggil history.back(), selain itu langsung ke beranda.
    • Kotak cari punya label aksesibel; pesan hasil kosong ada di live region role=status.
    • Lapisan glitch disembunyikan dan kursor berhenti berkedip dengan prefers-reduced-motion.

    Komponen terkait

    Komponen section lain dengan class yang sama di setiap framework.