Atelier UI

搜索组件…

搜索组件…

Search Input

搜索输入框:「/」快捷键聚焦、Esc 清空、加载中状态与清除按钮。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

SearchInputProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"input">, "value" | "defaultValue" | "onChange" | "type">

属性类型默认值说明
valuestring——
defaultValuestring""—
onValueChange(value: string) => void——
onSearch(value: string) => void—Fired on Enter
loadingbooleanfalse—
shortcutstring"/"Global key that focuses the field, set to "" to disable

安装

$ npx shadcn@latest add https://chromotion.dev/r/search-input.json

同类组件