Search 404
A 404 that is a search. The field opens filled with the words of the address that failed, so the likely pages are listed before anything is typed, and results move into their new order as you type, forgiving a typo per word.
404
Let's find it another way
Error 404. Nothing lives at /blog/motoin-tips. We searched for its words instead.
- Motion tips for product UIDurations, easing and when not to animate/blog/motion-tips
- MotionThe motion tiers and reduced motion/docs/motion
- Designing dense tablesRows people can scan/blog/dense-tables
3 pages match
When to use
- Content sites, docs and help centres with many pages.
- Sites where old links break often after a move.
When not to use
- Sites with a handful of pages; link them directly.
- Apps where the search would leak private page titles to signed-out visitors.
Installation
pnpm dlx shadcn@latest add @caliper/not-found-search
Adds its 5 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
NotFoundSearch
6 props
searchPages
0 props
No props of its own; it accepts the native props of its root element.
pathQuery
0 props
No props of its own; it accepts the native props of its root element.
Keyboard
- ↓
- Moves to the next item or value.
- ↑
- Moves to the previous item or value.
- Enter
- Activates the focused control.
Accessibility
It exposes combobox, listbox, option and status semantics, with aria-hidden, aria-expanded, aria-controls, aria-activedescendant, aria-autocomplete and aria-label kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/not-found-search.mdThe index of every part is at /llms.txt.