Loading...
Loading...
Compare original and translation side by side
| Type | Blocks background | Anchored to trigger | Typical content | Dismiss with |
|---|---|---|---|---|
| Tooltip | No | Yes | 1–2 lines of explanatory text | Cursor leave / focus out |
| Popover | No | Yes | Short interactive content: a form field, a picker, a small list | Click outside, Escape, explicit close |
| Dropdown / Menu | No | Yes | List of actions or options | Click outside, Escape, selection |
| Bottom sheet (mobile) | Partial (dimmed) | No | Actions or content on small screens | Swipe down, tap scrim, Escape |
| Drawer / Side panel | Partial (dimmed) | No | Secondary editing, detail views, long forms | Escape, explicit close; optionally click scrim |
| Dialog / Modal | Yes (full scrim) | No | Blocking task: confirm action, fill required form | Escape (non-destructive only), explicit button |
| Full-screen overlay | Yes (complete) | No | Immersive task: media viewer, complex configuration | Explicit close only |
| 类型 | 是否阻塞背景 | 是否锚定到触发元素 | 典型内容 | 关闭方式 |
|---|---|---|---|---|
| Tooltip | 否 | 是 | 1-2行说明文本 | 光标离开 / 失去焦点 |
| Popover | 否 | 是 | 简短交互内容:表单字段、选择器、小型列表 | 点击外部、Escape键、显式关闭按钮 |
| Dropdown / Menu | 否 | 是 | 操作或选项列表 | 点击外部、Escape键、选择选项 |
| Bottom sheet(移动端) | 部分阻塞(变暗) | 否 | 小屏幕上的操作或内容 | 向下滑动、点击遮罩、Escape键 |
| Drawer / Side panel | 部分阻塞(变暗) | 否 | 次要编辑任务、详情视图、长表单 | Escape键、显式关闭按钮;可选点击遮罩 |
| Dialog / Modal | 是(完全遮罩) | 否 | 阻塞性任务:确认操作、填写必填表单 | Escape键(仅非破坏性操作)、显式按钮 |
| Full-screen overlay | 是(完全阻塞) | 否 | 沉浸式任务:媒体查看器、复杂配置 | 仅支持显式关闭 |
role="tooltip"aria-describedbyrole="tooltip"aria-describedbyrole="dialog"role="listbox"aria-haspopuprole="dialog"role="listbox"aria-haspopup↑↓EnterEscape↑↓EnterEscaperole="dialog"role="dialog"rgba(0,0,0,0.4)role="dialog"aria-modal="true"aria-labelledbyrgba(0,0,0,0.4)role="dialog"aria-modal="true"aria-labelledby┌──────────────────────────────────┐
│ Title [✕] │ ← Header: title + close button
├──────────────────────────────────┤
│ │
│ Body content │ ← Content: scrolls if needed
│ (description, form, media) │
│ │
├──────────────────────────────────┤
│ [Cancel] [Confirm]│ ← Footer: actions, right-aligned
└──────────────────────────────────┘┌──────────────────────────────────┐
│ Title [✕] │ ← 头部:标题 + 关闭按钮
├──────────────────────────────────┤
│ │
│ Body content │ ← 内容:需要时可滚动
│ (description, form, media) │
│ │
├──────────────────────────────────┤
│ [Cancel] [Confirm]│ ← 底部:操作按钮,靠右对齐
└──────────────────────────────────┘| Size | Width | Use for |
|---|---|---|
| Small | 360px | Short confirmations, single-field prompts |
| Medium | 480px | Standard dialogs, short forms |
| Large | 640px | Multi-field forms, richer content |
| Full-screen | 100% viewport | Immersive tasks; use sparingly |
| 尺寸 | 宽度 | 适用场景 |
|---|---|---|
| 小型 | 360px | 简短确认、单字段提示 |
| 中型 | 480px | 标准对话框、短表单 |
| 大型 | 640px | 多字段表单、丰富内容 |
| 全屏 | 100%视口 | 沉浸式任务;谨慎使用 |
| Trigger | Allowed for non-destructive? | Allowed for destructive? |
|---|---|---|
| Yes | No — require explicit Cancel |
| Click outside scrim | Yes (optional) | No — too easy to dismiss accidentally |
| Close button (✕) | Yes | Yes |
| Cancel button | Yes | Yes |
| 触发方式 | 非破坏性操作是否允许 | 破坏性操作是否允许 |
|---|---|---|
| 是 | 否 — 需显式点击Cancel |
| 点击遮罩外部 | 是(可选) | 否 — 易误触关闭 |
| 关闭按钮(✕) | 是 | 是 |
| Cancel按钮 | 是 | 是 |
TabShift+TabTabShift+Tab<dialog><dialog><div
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
aria-describedby="modal-description"
>
<h2 id="modal-title">Delete project?</h2>
<p id="modal-description">
This will permanently delete "Apollo" and all its data. This cannot be undone.
</p>
<button>Cancel</button>
<button>Delete</button>
</div>role="dialog"aria-modal="true"aria-labelledbyaria-describedbyaria-hidden="true"<div
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
aria-describedby="modal-description"
>
<h2 id="modal-title">Delete project?</h2>
<p id="modal-description">
This will permanently delete "Apollo" and all its data. This cannot be undone.
</p>
<button>Cancel</button>
<button>Delete</button>
</div>role="dialog"aria-modal="true"aria-labelledbyaria-describedbyaria-hidden="true"Delete "Apollo Project"? This will permanently remove all tasks, files, and history. This cannot be undone. [Cancel] [Delete project]
Are you sure you want to do this? [No] [Yes]
--color-error--color-danger--color-primary删除「Apollo项目」? 此操作将永久删除所有任务、文件和历史记录,且无法撤销。 [取消] [删除项目]
确定要执行此操作吗? [否] [是]
--color-error--color-danger--color-primaryrole="dialog"aria-modal="true"aria-labelledbyrole="dialog"aria-modal="true"aria-labelledby