Search

Search primitives expose SSR-safe markup that hydrates into a FlexSearch-powered client app. Use <Search /> for the default layout or mix the smaller components to control every region of the page.

<Search />

Props

ComponentPropTypeNotes
SearchlayoutstringOptional layout override for the results region ('grid' or 'list').
SearchSummaryclassNamestringFinely control typography above the results.
SearchResultslayoutstringChoose between 'grid' (masonry) and 'list' (stacked cards).
SearchResultsheadingLevelnumberThe level of each page result's title, 2 to 6. By default one below the last heading before the results: 2 under the page's h1.
SearchTabsclassNamestringStyle the per-type tabs.
SearchFormModalmode'dialog' \/ 'inline'Render the search drawer in dialog or inline form mode.

Every component reads from the same client store and URL params, so you can scatter them around the layout without extra plumbing.

Examples

Custom layout

Compose your own layout inside content/search/_layout.mdx. The header's search field drives the results, so the layout needs no field of its own; open it with the page's h1.

content/search/_layout.mdx
<section className="space-y-6">  <header className="space-y-2">    <h1>Search</h1>    <p>Browse works and documentation pages from the Northwestern collections.</p>  </header>  <SearchTabs />  <SearchSummary /></section> <SearchResults layout="grid" />

List layout

Flip to a list view when you need dense metadata instead of masonry cards.

<SearchResults layout="list" />

Use the modal helper when you need a search trigger outside the main page tree, such as the global header.

<SearchFormModal mode="dialog">  <button type="button" className="btn">Open search</button></SearchFormModal>