Forgiving Search
Search for menus and command palettes that still finds "Export as PDF" when you type "exprot". Every row marks the letters it matched.
Needs: None. Matching runs in the page.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| items | { id: string; label: string; hint?: string }[] | required | What can be found. Hint shows on the right, e.g. a shortcut. |
| placeholder | string | "Search" | Shown in the empty field. |
| limit | number | 6 | Most results shown at once. |
| accent | string | "#2f6fed" | Colour of fixed letters, the typo count and the focus ring. The default lightens in dark mode. |
| defaultQuery | string | "" | What's in the field to begin with. |
| onSelect | (item: SearchItem) => void | – | Called with the chosen item, by click or Enter. |
| className | string | – | Class on the wrapper. |
| style | CSSProperties | – | Style on the wrapper. |