Centered 404 not found page led by a monospace numeral, with a short explanation and Go Home plus Go Back buttons.
@7ovr
registry/blocks/error/1/error-block.tsx
import { Button } from "@/components/ui/button"
import { IconPlaceholder } from "@/components/icons/icon-placeholder"
export default function ErrorBlock() {
return (
<section className="flex min-h-svh w-full flex-col items-center justify-center gap-6 bg-background px-6 py-12 text-center text-foreground">
<p className="font-mono text-7xl font-bold tracking-tighter sm:text-8xl">
404
</p>
<div className="flex flex-col items-center gap-2">
<h1 className="font-heading text-2xl font-bold tracking-tight sm:text-3xl">
Page not found
</h1>
<p className="max-w-md text-sm text-muted-foreground">
The page you are looking for does not exist or has been moved. Check
the URL, or head back to safety.
</p>
</div>
<div className="flex flex-col items-center gap-2 sm:flex-row">
<Button
render={<a href="#" />}
nativeButton={false}
className="w-full sm:w-auto"
>
<IconPlaceholder
lucide="Compass"
tabler="IconCompass"
hugeicons="CompassIcon"
phosphor="Compass"
remixicon="RiCompass3Line"
data-icon="inline-start"
aria-hidden="true"
/>
Go Home
</Button>
<Button
variant="outline"
render={<a href="#" />}
nativeButton={false}
className="w-full sm:w-auto"
>
<IconPlaceholder
lucide="ArrowLeft"
tabler="IconArrowLeft"
hugeicons="ArrowLeftIcon"
phosphor="ArrowLeft"
remixicon="RiArrowLeftLine"
data-icon="inline-start"
aria-hidden="true"
/>
Go Back
</Button>
</div>
</section>
)
}
Requires a base-* style in components.json (the shadcn init default). Legacy new-york/radix-* styles install Radix primitives, which reject the render prop this block uses.