Centered 404 Page
A centred 404 with a big gradient code, a heading, sub-copy and a pair of recovery actions.
3 फ्रेमवर्कशुरुआती
An empty search-results state that echoes the query and offers Clear search and Browse all.
<section class="mx-auto flex w-full max-w-lg flex-col items-center px-4 py-16 text-center sm:py-24">
<span class="flex h-16 w-16 items-center justify-center rounded-full bg-blue-50 text-blue-600 dark:bg-blue-950 dark:text-blue-400">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" class="h-8 w-8" aria-hidden="true">
<circle cx="11" cy="11" r="7" />
<path d="m21 21-4.3-4.3" />
</svg>
</span>
<h1 class="mt-6 text-2xl font-bold tracking-tight text-gray-900 sm:text-3xl dark:text-gray-100">
No results found
</h1>
<!-- The query is wrapped in min-w-0 break-words so a long term can't push past the viewport. -->
<p class="mt-3 max-w-md break-words text-base leading-relaxed text-gray-600 dark:text-gray-400">
We couldn't find anything for <span class="font-semibold text-gray-900 dark:text-gray-100">"quantum widgets"</span>. Try a different term or check your spelling.
</p>
<div class="mt-8 flex w-full flex-col items-center justify-center gap-3 sm:flex-row">
<button type="button" class="inline-flex w-full items-center justify-center rounded-lg bg-blue-600 px-5 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-blue-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:ring-offset-white motion-reduce:transition-none sm:w-auto dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950">
Clear search
</button>
<a href="/" class="inline-flex w-full items-center justify-center rounded-lg border border-gray-300 bg-white px-5 py-2.5 text-sm font-semibold text-gray-700 transition-colors hover:bg-gray-50 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:ring-offset-white motion-reduce:transition-none sm:w-auto dark:border-gray-700 dark:bg-transparent dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-gray-100 dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950">
Browse all
</a>
</div>
</section>| Prop | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
query | string | - | Query |
title | string | 'No results found' | कार्ड की हेडिंग टेक्स्ट। |
message | string | - | नोटिफ़िकेशन का मुख्य टेक्स्ट। |
clearLabel | string | 'Clear search' | Clear label |
onClear | () => void | - | On clear |
browseLabel | string | 'Browse all' | Browse label |
browseHref | string | '/' | Browse href |
className | string | - | रूट एलिमेंट पर मर्ज होने वाली अतिरिक्त क्लासेज़। |
Pass the `query` and it is echoed in the message inside a `break-words` block so a long term can never push past the viewport. `onClear` resets the search; `browseHref` is the catch-all fallback.