Advanced Search
Search everything, or run a command, from one ⌘K dialog.
import { AdvancedSearch } from "@sagui/ui";Loading demo
When to use
- App-wide search across records, with scopes, filters and a preview.
- Typing “>” to switch to commands.
When not to use
- Use CommandPalette for commands only, and SearchField for one list.
Installation
Install the package and import the styles once. The installation guide covers the Tailwind setup.
$ npm install @sagui/uiUsage
import { AdvancedSearch } from "@sagui/ui";
<AdvancedSearch open={open} onOpenChange={setOpen} results={results} scopes={scopes} onSelect={(r) => router.push(r.href)} />Accessibility
- The input is a
comboboxthat controls alistbox, witharia-activedescendanton the active row. - ↑ and ↓ move, Enter opens, ⌘/Ctrl+Enter opens in a new tab, Escape closes.
- Full screen on phones, with a Cancel button.