AI 对话界面
搜索结果
命令面板查找内容:每输入一个字母,结果实时筛选并加粗匹配部分,首个结果被高亮,回车后闪烁并提示已打开。
安装
npx @imgcli/cli add search-results使用
import { SearchResults } from "@/components/imgcli/search-results";
<SearchResults
query="design"
items={[
{
"title": "Design system",
"kind": "Docs"
},
{
"title": "Project roadmap",
"kind": "Plan"
},
{
"title": "Design review notes",
"kind": "Note"
},
{
"title": "API reference",
"kind": "Docs"
},
{
"title": "Design tokens",
"kind": "Reference"
},
{
"title": "Meeting notes",
"kind": "Note"
},
{
"title": "Design handoff guide",
"kind": "Guide"
}
]}
openedLabel="Opening Design system"
/>;默认示例:通过输入缩小工作区的设计文档搜索范围,并打开设计系统。以 30 fps 渲染 132 帧(4.4 秒)。
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
query | string | "design" | |
items | readonly SearchResultsItem[] | 见使用示例 | Everything searchable; the list shows the ones whose title contains the query so far. |
maxResults | number | 5 | How many results the list shows at most. |
openedLabel | string | "Opening Design system" | |
fontFamily | string | — | A face from the Imgcli font list, or any loaded CSS font stack. |
accentColor | string | — | |
theme | Partial<ImgcliTheme> | — | |
mode | "light" | "dark" | — | |
speed | number | 1 |
许可
MIT 许可,可免费用于个人及商业项目,保留版权和许可声明。
Copyright (c) 2026 Ricky (Imgcli) <https://imgcli.com>
常见问题
如何在 Remotion 项目中使用搜索结果?
运行 npx @imgcli/cli add search-results。CLI 会把组件源码复制到项目的 components/imgcli/ 目录并安装依赖,之后可以直接修改源码。
搜索结果能做什么?
命令面板查找内容:每输入一个字母,结果实时筛选并加粗匹配部分,首个结果被高亮,回车后闪烁并提示已打开。
使用搜索结果前需要准备什么?
准备 Node.js 20.19 或更高版本,以及一个 Remotion 项目。新项目可以用 npx create-video@latest 创建。免费组件采用 MIT 许可证。