404 / Not Found Stacked
beui/not-found-stackedFreeBlock
A code card over a hidden stack that fans out with a spring on hover.
Install it
npx shadcn@latest add https://beui.dev/r/not-found-stacked.jsonSource
1"use client";2// beui.dev/components/blocks/not-found34import { motion, useReducedMotion } from "motion/react";5import { SPRING_PANEL } from "@/lib/ease";6import { useHoverCapable } from "@/lib/hooks/use-hover-capable";7import {8 NOT_FOUND_DEFAULTS,9 NotFoundActions,10 NotFoundStage,11 type NotFoundProps,12} from "./shared";1314const CARD =15 "absolute inset-0 rounded-3xl border border-border bg-card shadow-sm";1617export function NotFoundStacked({18 className,19 code = NOT_FOUND_DEFAULTS.code,20 title = NOT_FOUND_DEFAULTS.title,21 description = NOT_FOUND_DEFAULTS.description,22 homeHref,23 homeLabel,24 browseHref,25 browseLabel,26}: NotFoundProps) {27 const reduce = useReducedMotion();28 const canHover = useHoverCapable();29 const interactive = !reduce && canHover;3031 return (32 <NotFoundStage className={className}>33 <motion.div34 initial="rest"35 animate="rest"36 whileHover={interactive ? "hover" : undefined}37 className="relative h-44 w-64"38 >39 <motion.div40 aria-hidden41 variants={{ rest: { rotate: 0, x: 0, y: 0 }, hover: { rotate: -9, x: -28, y: 8 } }}42 transition={SPRING_PANEL}43 className={CARD}44 />45 <motion.div46 aria-hidden47 variants={{ rest: { rotate: 0, x: 0, y: 0 }, hover: { rotate: 9, x: 28, y: 8 } }}48 transition={SPRING_PANEL}49 className={CARD}50 />51 <motion.div52 variants={{ rest: { y: 0 }, hover: { y: -6 } }}53 transition={SPRING_PANEL}54 className="absolute inset-0 flex flex-col items-center justify-center gap-1 rounded-3xl border border-border bg-card shadow-md"55 >56 <h1 className="select-none font-bold leading-none tracking-tighter text-foreground [font-size:clamp(3.5rem,9vw,5rem)]">57 {code}58 </h1>59 <span className="text-xs font-medium uppercase tracking-wide text-muted-foreground">60 out of the deck61 </span>62 </motion.div>63 </motion.div>6465 <div className="flex flex-col items-center gap-2">66 <p className="text-lg font-semibold text-foreground">{title}</p>67 <p className="max-w-sm text-sm text-muted-foreground">{description}</p>68 </div>6970 <NotFoundActions71 homeHref={homeHref}72 homeLabel={homeLabel}73 browseHref={browseHref}74 browseLabel={browseLabel}75 />76 </NotFoundStage>77 );78}
What it pulls in
npm packages
Files it writes
More from beui
All 104 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| File Upload Attachment Uploadattachment-upload | beui | Blocks | Free | 4 deps · 5 files | |
| Availability Scheduleravailability-scheduler | beui | Blocks | Free | 4 deps · 15 files | |
| Bloom Menubloom-menu | beui | Blocks | Free | 4 deps · 3 files | |
| Command Palettecommand-palette | beui | Blocks | Free | 4 deps · 3 files | |
| Dynamic Islanddynamic-island | beui | Blocks | Free | 3 deps · 3 files | |
| Expandable Action Barexpandable-action-bar | beui | Blocks | Free | 3 deps · 2 files | |
| Expandable Tabsexpandable-tabs | beui | Blocks | Free | 3 deps · 3 files | |
| Feedback Widgetfeedback-widget | beui | Blocks | Free | 4 deps · 9 files |
