Search Input
Input prewired with a search glyph, clear control, and Escape-to-empty.
Default
Default size is 40px. Prefix is the search icon; a value reveals the clear button.
Sizes
small is 32px. default and medium are 40px. large is 48px.
Command hint
cmdk swaps the clear button for a Meta+K chip. After typing it becomes Esc.
Loading
loading replaces the suffix with a spinner so in-flight search stays obvious.
Disabled
Custom prefix
Override the magnifier with the prefix slot. Icon data still comes from @hugeicons/core-free-icons.
Best practices
- Always pass
aria-labelor a visible label. The glyph is decoration. - Placeholder is a short action, not the field name restated.
Search projects…, notSearchagain. - Keep
loadingon while results are in flight. Do not swap the whole field for a spinner. cmdkis for command palettes. Ordinary filters should keep the clear button.- Escape already clears. Do not bind a second Escape handler that fights it.
- Use
Inputwhen the field is not search. This wrapper is only the search chrome.