Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.06 KB

File metadata and controls

43 lines (30 loc) · 1.06 KB

Search

Pagefind-powered full-text search modal. Renders a trigger button (Ctrl+K) and a <dialog> container that is populated client-side by the Pagefind UI library.

Import

import Search from 'igniteui-astro-components/components/Search.astro';

Props

None — the component is self-contained.

Behaviour

  • The search index (/pagefind/) is generated by running pagefind --site <outDir> after a production build. This is wired automatically by siteMetaIntegration.
  • In development the button renders but the dynamic Pagefind import resolves as a no-op — no runtime errors.
  • Keyboard shortcut: Ctrl+K / ⌘K to open, Escape to close.

Example

Search is included automatically inside DocsSubHeader / DocsLayout. Mount it directly if you build a custom header:

---
import Search from 'igniteui-astro-components/components/Search.astro';
---
<Search />

Build setup

Ensure Pagefind runs after astro build:

// package.json
{
  "scripts": {
    "build": "astro build && pagefind --site dist"
  }
}