跳到正文
UIGrammer
EN 中文

组件 · 输入 · 09

搜索

搜索 = 带前置图标、可一键清空值的输入框,结果区是独立的表面。

直达修改 Prompt

GlassmorphismStyle
Glass buttonsComponent
Glassmorphic loginTheme

搜索是什么?

搜索是带结果承诺的输入框。点名图标位置、清空入口,以及快捷键做什么。

变体

点击属性即可在预览中高亮。

在 Prompt 里写明这个类型。
在 Prompt 里写明这个类型。
在 Prompt 里写明这个类型。
给具体值,不要只给感觉词。
给具体值,不要只给感觉词。
给具体值,不要只给感觉词。
给具体值,不要只给感觉词。
给具体值,不要只给感觉词。

状态

点击属性即可在预览中高亮。

无数据时的状态,需给出提示与下一步操作。
在 Prompt 里写明这个状态。
在 Prompt 里写明这个状态。
在 Prompt 里写明这个状态。
键盘聚焦状态:清晰的焦点环或边框变化,永远不要去掉。

结构解剖

这些是 Prompt 里应该点名的部件。

  • 01 输入框
  • 02 前置图标
  • 03 清空按钮
  • 04 建议列表

什么时候用

  • 筛选已在页面上的表格
  • 顶栏带快捷键的全局搜索
  • 直达操作的命令式搜索

什么时候别用

  • 条目不足十条——直接展示比搜索更好
  • 结果需要分面筛选——改用搜索页
  • 还没有可搜的内容

Put the shortcut hint inside the field — a bare magnifier tells the user nothing about where search lives.

Create a search component. STYLE - 36px field, 10px radius, #F5F5F7 surface, no border - 16px leading magnifier in #6E6E73, 8px gap to the text - a clear button appears only when the field has a value - focus widens the field to 280px with a 220ms ease STATES - empty, typing, with results, no results, focus with a 2px ring TECHNICAL - React - Tailwind CSS - shadcn/ui