Search Input
Search field with a / focus shortcut, Esc to clear, loading state and a clear button.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
SearchInputProps
Also accepts all props of Omit<React.ComponentProps<"input">, "value" | "defaultValue" | "onChange" | "type">
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | — | — |
| defaultValue | string | "" | — |
| onValueChange | (value: string) => void | — | — |
| onSearch | (value: string) => void | — | Fired on Enter |
| loading | boolean | false | — |
| shortcut | string | "/" | Global key that focuses the field, set to "" to disable |
Install
$ npx shadcn@latest add https://chromotion.dev/r/search-input.json