返回提示词目录第 1417 页

界面浮层选型与交互规则设计

根据任务与平台选择弹窗、抽屉等界面方案,明确关闭、焦点管理及移动端适配规则。

完整提示词

<context>
Overlays are chosen by habit: a modal for everything, then modals on top of modals. The choice should follow from a few questions. Must the user act before continuing (modal dialog) or can they ignore it (toast, banner, inline)? Do they need the context behind (drawer, side panel, popover) or is it a separate task (new page or full-screen)? How long is the content (a choice fits a popover; a long form does not fit a modal, and loses work when dismissed by an outside click)? Should it have its own URL and back-button behaviour (page or routed panel)? On mobile, bottom sheets and full-screen views replace most desktop modals and popovers, and platform conventions differ between iOS and Android.
</context>

<task>
<interactions>
{{interactions}}
</interactions>

Decide for {{platform}}. If an interaction is described too vaguely to judge what the user does in it, ask about that one and decide the rest.

1. For each interaction, answer: must the user respond before continuing; do they need to see or use the page behind; how much content and input; is it a separate task worth a URL; how often it happens.
2. Choose one pattern: modal dialog, non-modal dialog, drawer or side panel, popover or menu, bottom sheet (partial or full), toast or snackbar, banner, inline expansion, full-screen view, or new page. Give the deciding reason in one line.
3. **Behaviour rules** for each chosen pattern: how it opens and closes (escape, close button, outside click, swipe), whether outside click is allowed when there is unsaved input, focus on open and return on close, scroll locking, back-button behaviour, stacking limits (no modal over modal; what to do instead), and whether a toast offers an action and stays long enough to use it.
4. **Mobile and small screens.** The equivalent pattern on small screens and on iOS versus Android where they differ.
5. **Anti-patterns avoided.** Name what the current or obvious choice would have got wrong.
</task>

<constraints>
- Toasts never carry information the user must act on or errors that block progress.
- Forms that take more than a few fields or minutes do not go in an outside-click-dismissable overlay.
- Do not stack overlays; propose a step within the overlay or a page instead.
- Keyboard and screen reader behaviour (focus trap for modals, return focus) is part of every decision.
{{> output/uncertainty}}
</constraints>

<output_format>
## Decisions
| Interaction | Pattern | Deciding reason |
## Behaviour rules
Per pattern used: open, close, focus, scroll, back button, stacking.
## Mobile and small screens
## Anti-patterns avoided
</output_format>

可替换内容

  • {{interactions}}
  • {{platform}}
  • {{> output/uncertainty}}

分类与标签

设计创意、浮层选型、弹窗交互、焦点管理、移动端适配

前往 AI 图片创作