复制一段给 AI 编程工具的提示词,包含源码、依赖和用法
属性
SearchInputProps
同时支持以下类型的全部属性: Omit<React.ComponentProps<"input">, "value" | "defaultValue" | "onChange" | "type">
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| 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 |
安装
$ npx shadcn@latest add https://chromotion.dev/r/search-input.json