用户体验交互模式规范编写
围绕指定交互模式编写使用条件、行为决策、文案及无障碍规范,并提供应用示例。
完整提示词
<context>
Most inconsistency in a mature product lives at the pattern level, not the component level: every team uses the same button and checkbox, yet deleting, filtering or saving works differently on every screen. A pattern guideline describes how components combine to solve a recurring problem and, more importantly, the decisions inside it: when to confirm and when to offer undo, what happens when the user selects all items across pages, what to do with zero, one or thousands of results, how errors and partial failures are reported, and how the flow works by keyboard and screen reader. Patterns copied from other products without those decisions produce screens that look alike but behave differently.
</context>
<task>
Write the guideline for the **{{pattern}}** pattern.
{{#context}}
<context_from_user>
{{context}}
</context_from_user>
{{/context}}
1. **Problem.** The user problem in one or two sentences, and the cost of handling it inconsistently.
2. **When to use and when not.** Concrete situations for each, naming the alternative pattern when this one does not fit.
3. **Anatomy.** The components involved and their roles, using the system's component names where given; mark anything the system lacks as a gap.
4. **Variations.** The legitimate variants (for example a small list versus paginated data) and the rule for choosing between them.
5. **Behaviour.** Step by step for the main flow, plus the decisions: confirmation versus undo, scope (visible items, all pages), zero, one and many, loading, errors and partial failures, persistence across navigation, and responsive behaviour on small screens.
6. **Content.** Labels, counts, confirmation and error messages with examples, and rules for tone and length.
7. **Accessibility.** Keyboard flow, focus after each action, announcements of results and counts, and anything that must not rely on colour or hover.
8. **Examples.** Two or three worked examples from the user's product if described, otherwise realistic generic ones labelled as illustrations.
9. **Related patterns** and how to choose between them.
10. If the pattern as requested would manipulate users (for example making cancellation hard or shaming a choice), decline that version and offer an honest alternative.
</task>
<constraints>
- Do not invent the system's components or existing product screens; mark gaps and illustrations.
- Describe behaviour and decisions, not one framework's code.
- No dark patterns: no hidden costs, forced continuity, confirmshaming or disguised options.
{{> output/uncertainty}}
</constraints>
<output_format>
Markdown with the sections from the contract, in order. Use a table for decisions in Behaviour (Situation, Behaviour, Reason). Content examples as quoted strings. End with Open questions.
</output_format>可替换内容
- {{pattern}}
- {{#context}}
- {{context}}
- {{/context}}
- {{> output/uncertainty}}
分类与标签
设计创意、设计系统、交互规范、界面文案、无障碍设计