Not foundNew
A 404 with a search and a puppy: Fetch sniffs as you type, sprints off to fetch the results and comes back with a newspaper, or a stick.
Used for404 pagesDocsEmpty searchOld links
Want a reactive 3D character for this state? See Hairline Mascots (free MIT starter or all 8 characters).
Install with the shadcn CLI
Older shadcn CLI, or a network that blocks ui.shadcn.com? Install by URL: shadcn add https://hairlineui.com/r/not-found.json. More
Templates
Need the whole page?
65 Next.js landing pages, each designed from scratch. Try any of them live; one is $39, all of them $159, and 8 are free.
Where it’s used
404 pages
The not-found page of a site or app, with a way to find what moved.
Docs
A missing docs page that searches the docs straight away.
Empty search
The no-results state of any search, with a stick for comfort.
Old links
Retired campaign or blog URLs that should still lead somewhere.
What it handles for you
Most 404 pages leave people to guess. This block shows the address that failed, searches as soon as they type, and always offers somewhere to go.
Search that waits
search runs 350ms after typing stops; each newer query aborts the older request through its AbortSignal.
Results as links
{ title, href, hint } rows, up to five, that drop in as they arrive.
Never a dead end
With nothing found (or before searching) your popular pages show instead.
The address
path shows exactly what wasn’t found.
Failures said plainly
If search throws, Fetch comes back empty-mouthed and says he couldn’t get out.
A way home
homeHref is always there under the list.
Overview
A 404 page is usually a big number, an apology and a link home. This one goes and looks. A 404 is engraved into the lit stage and Fetch, an illustrated golden retriever puppy, sits in front of it with his tongue out. Start typing what you were after and he puts his nose to the ground, twitching with every key. When the typing stops he sprints off the edge of the stage, his legs switching between two strides, and your search runs; type again and the older search is aborted. He runs back in with a newspaper in his mouth and the results drop in under the field, or, if nothing matched, sits there sheepishly with a stick (“fetch() came back with a stick”) and your popular pages come back. Under the puppy it is a real recovery page: the missing address, a labelled search with a clear button, links that are links, and a way home.
States
- lost
- Fetch sits by a 404 engraved in outline on the lit stage, panting, wagging and tilting his head; “Fetch lost this page too”. Popular pages are listed under the search.
- sniff
- While you type: nose to the ground, sniffing, until 800ms after the last key; “Fetch has a scent”.
- fetch
- 350ms after typing stops: he gallops off the right edge (520ms, accelerating), a real run cycle at 15 frames a second; “Fetch is fetching…”.
- found
- He gallops back in (700ms, slowing), then sits wagging proudly with a newspaper; the results drop in 50ms apart; “Fetch found 2”.
- stick
- No results: he comes back with a stick and looks sheepish, “fetch() came back with a stick”, and the links return under “Try one of these”.
- offline
- search throws: he comes back with nothing and says he couldn’t get out; the links stay.
Usage
Depends on lucide-react, installed for you by the CLI along with the keyframes it needs.
Works with
As the Next.js not-found page
app/not-found.tsx renders for every unmatched route; read the path on the client and search your own index.
Props
- search
- (query: string, signal: AbortSignal) => Promise<NotFoundResult[]>
- Find pages for a query: { title, href, hint? }. Called 350ms after typing stops; aborted when a newer query starts.
- links= []
- NotFoundResult[]
- Shown before anyone searches and when nothing is found.
- path
- string
- The address that wasn’t found, shown in the line under the title.
- homeHref= "/"
- string
- Where Take me home goes.
- name= "Fetch"
- string
- What the puppy is called in his lines.
Accessibility and motion
- The search is a labelled input with a clear button; results and links are plain links in a list that is announced politely when it changes.
- Fetch is decoration (aria-hidden) and animated: sitting, sniffing, running and both returns are loops of frames cut from a generated animation, shipped inside fetch-art.ts as WebP strips (145KB), so the install is complete. Each loop is one Web Animation (no frame loop); a rAF loop moves him across the stage only while he runs.
- One frame loop outside React moves him and sleeps when he’s still; his breathing is a compositor animation. The scene is drawn at 364 × 168 and scaled to the stage.
- With reduced motion he doesn’t run or twitch: his pose changes in place and the results appear without rising.
- Built from Input and Text morph, which the CLI installs with it. No animation library.
Requirements
React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.
The CLI also installs Input, Text morph.
Source
Registry item: /r/not-found.json


