SearchInput
v1.0.5Updated 28 Sept 2026Canonical build69 search-input composite. Leading magnifier, optional clear button, platform-aware ⌘K kbd hint, optional global keyboard shortcut, debounced onDebouncedChange, async loading spinner, pill / full-width var
Preview
Live · 14 stories▸Why this is recommendedformsearchinputkbd+5
The default, out-of-the-box SearchInput.
- ✓Topbar global search
- ✓DataTable / list filter
- ✓Sidebar quick-filter
- ✓Command-palette trigger
- Variants: default / subtle / ghost / outline
- Sizes: sm / default / lg
- Platform-aware ⌘K / Ctrl+K kbd hint via Kbd primitive
- Global keyboard shortcut focuses the input from anywhere
- Debounced onDebouncedChange with configurable debounceMs
- Clear (×) button when value present
- Async loading spinner (replaces clear)
- rounded="full" pill mode
- width presets: auto / sm / md / lg / xl / full
- i18n: labels prop overrides the clear-button aria-label
- Labelled by FormField: the placeholder fallback name steps aside for the field label, the box fills the field column, aria-invalid paints the destructive ring on the input, and FormField draws no overlay icon over the clear button / spinner
- ✕Multi-value chip pickers (use TagInput)
- ✕Async option picking (use ComboboxAsync)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
valueControlled value
—onValueChangeValue callback
—onDebouncedChangeFires after debounce
—debounceMsDebounce delay (default 200, 0 disables)
—variantVisual variant
—sizeSize scale
—showKbdShow platform-aware kbd hint
—shortcutGlobal keyboard shortcut to focus
—loadingShow trailing spinner
—roundedPill mode
—widthWidth preset; defaults to auto, or full when the search box is a FormField control
—labelsOverride built-in UI strings (i18n)
—aria-labelledbyId(s) of the element(s) that label the input (the placeholder fallback name then steps aside); wins over a FormField label
—