Skip to content
UI Kit
Accent color

Search results

The page after the search. Found words marked, tabs per type, filters with counts, instant suggestions and an empty result that still helps.

5 variants
Switch category

Search results

List with tabs

One list of results with the found words marked. Tabs per type with counts, more results on demand.

Open in Studio

Grouped

The best three of every type, each group with a link to all. The search and the groups stay on the left.

Open in Studio

With filters

Facets with live counts, active filters as chips, sorting. On phones the filters open in place.

Open in Studio

Instant search

Suggestions while typing, arrow keys to move and Enter to open. Empty, it shows recent and popular searches.

Open in Studio

No results

An empty result that still leads on. A spelling suggestion, popular searches and three ways forward.

Open in Studio

Details

What Search results brings along, read from the registry and the source.

Variants
5
Version
1.0.1 · since 1.0.0
File
components/ui/search-results.tsx
Brings along
utilskitbuttoniconrevealmotionsection
npm packages
None
Languages
English and German, 27 texts of its own

Props

The SearchResultsProps interface from components/ui/search-results.tsx, with the comments from the code.

  • variantoptional
    SearchResultsVariant

    listgroupedwith-filtersinstantno-results

  • queryoptional
    string

    The words searched for

  • resultsoptional
    SearchResult[]
  • typesoptional
    SearchType[]

    Tabs and groups, in this order

  • facetsoptional
    SearchFacet[]

    with-filters: the facets

  • pageSizeoptional
    number

    list: how many results show before "Show more"

  • suggestionoptional
    string

    no-results: a corrected query

  • popularoptional
    string[]

    no-results, instant: popular searches

  • recentoptional
    string[]

    instant: searches of this visitor

  • linksoptional
    { icon: IconName; title: string; text: string; href: string }[]

    no-results: ways forward

  • actionoptional
    string

    Where the form sends the query (GET, field q)

  • onSearchoptional
    (query: string) => void

    Called with the query instead of sending the form

Built-in texts

Search results writes these texts itself. The language follows the KitProvider, the labels prop replaces single ones.

Show all 27 texts
searchEnglish SearchGerman Suchen
placeholderEnglish Search the siteGerman Website durchsuchen
clearEnglish Clear searchGerman Suche leeren
resultsEnglish {n} results for “{q}”German {n} Ergebnisse für „{q}“
resultEnglish 1 result for “{q}”German 1 Ergebnis für „{q}“
allEnglish AllGerman Alle
showMoreEnglish Show more resultsGerman Weitere Ergebnisse zeigen
loadingEnglish LoadingGerman Wird geladen
shownEnglish Showing {a} of {b}German {a} von {b} angezeigt
viewAllEnglish All {n} in {type}German Alle {n} in {type}
filtersEnglish FiltersGerman Filter
clearFiltersEnglish Clear allGerman Alle entfernen
sortEnglish Sort byGerman Sortieren nach
relevanceEnglish RelevanceGerman Relevanz
azEnglish Title A to ZGerman Titel A bis Z
removeEnglish Remove filter {f}German Filter {f} entfernen
noMatchEnglish No result matches these filters. Remove one to see more.German Kein Ergebnis passt zu diesen Filtern. Entferne einen, um mehr zu sehen.
noneTitleEnglish Nothing found for “{q}”German Nichts gefunden für „{q}“
noneTextEnglish Check the spelling, try a shorter or a more general word, or start from one of the ways below.German Prüf die Schreibweise, versuch ein kürzeres oder allgemeineres Wort oder starte mit einem der Wege unten.
didYouMeanEnglish Did you meanGerman Meintest du
popularEnglish Popular searchesGerman Oft gesucht
recentEnglish Recent searchesGerman Zuletzt gesucht
suggestionsEnglish SuggestionsGerman Vorschläge
enterEnglish to openGerman öffnen
moveEnglish to moveGerman bewegen
closeEnglish to closeGerman schließen
noneInstantEnglish No direct match. Press Enter to search everything for “{q}”.German Kein direkter Treffer. Mit Enter durchsuchst du alles nach „{q}“.

Accessibility

Read from the source of the component.

  • Search results handles the keys Escape, Enter, Arrow up, Arrow down and Space itself.
  • Sets aria-controls, aria-expanded, aria-label, aria-labelledby and aria-selected, so screen readers announce purpose and state.
  • Uses the roles listbox, option, search, status, tab and tablist.
  • Announces changes through a live region without moving focus.
  • Every field has a label, visible or for screen readers.
  • Adds text for screen readers where icons and graphics stand alone.
  • Shows a visible focus ring when used with the keyboard.
  • The server renders the starting state in full, JavaScript only adds the interaction.

Motion

  • Rises in briefly the first time it comes into view (kit-rise, useInView).
  • Brings animations of its own, calmly timed and without wobble.
  • With reduced motion (prefers-reduced-motion) it stays still. 4 places in the code switch motion off then.

Frequent questions

How do I install Search results?

With aiw add @ai-website/search-results. The command puts components/ui/search-results.tsx into your project, the code is yours from then on. It brings along button, icon, reveal, motion and section. It needs no further npm packages.

Which variants does Search results have?

5 variants, List with tabs, Grouped, With filters, Instant search and No results. You pick one with the variant prop, for example variant="grouped".

Can I translate the texts of Search results?

Yes. Search results carries 27 texts of its own in English and German, such as “Search”, “Search the site” and “Clear search”. The language follows the KitProvider, single texts change through the labels prop.

Can an AI assistant build with Search results?

Yes. Through the MCP server of the aiw CLI, Claude, Cursor, GitHub Copilot, Windsurf, Codex and Gemini find Search results with aiw_components and install it with aiw_add @ai-website/search-results. Name the variant in your prompt, for example variant="list", and the assistant writes your content straight into the props.

Can I adjust Search results without code?

Yes, in the Studio. All 5 variants are editable there, texts, lists and switches. The Studio writes the matching SearchResults code to copy.

Often searched

Jump to

Copied to the clipboard