What This Template Is For
An interaction pattern is a reusable solution to a common UX problem. "How does the user dismiss a modal?" "How does inline editing work?" "What happens when a form has server-side validation errors?" These questions get answered differently by every designer and every engineer unless the answers are documented once and referenced everywhere.
Interaction patterns sit above components in the design system hierarchy. A button is a component. A confirmation dialog is an interaction pattern that uses buttons, text, and a modal overlay. A drag-and-drop reorder is an interaction pattern that uses list items, drag handles, and visual drop indicators. Patterns describe behavior across multiple components working together.
This template provides a structure for documenting each interaction pattern. It covers the pattern anatomy (what elements participate), triggers and actions (what initiates the pattern and what happens), state transitions (how the pattern moves between states), keyboard behavior, accessibility requirements, responsive adaptation, and common mistakes.
This works alongside the design system documentation template for the individual components that patterns compose. The motion design template defines the animation parameters that bring patterns to life. For teams building AI-driven interaction patterns, understanding established non-AI patterns is essential context. The design QA template provides the checklist for verifying patterns are implemented correctly.
How to Use This Template
- Identify patterns by auditing your product for repeated behaviors. Any time two features solve the same interaction problem differently (two different approaches to inline editing, two different confirmation flows), that is a pattern waiting to be documented.
- Document one pattern at a time. Start with the most common and most inconsistently implemented patterns.
- Write for two audiences: designers (who need to know when to use the pattern and what it looks like) and engineers (who need to know exactly how it behaves, including keyboard interactions and edge cases).
- Include a state diagram. A visual representation of states and transitions prevents ambiguity that text descriptions alone cannot resolve.
- Always include a "When NOT to use" section. Half the value of a pattern library is steering people away from patterns that seem appropriate but are wrong for the context.
The Template
Pattern Overview
| Field | Details |
|---|---|
| Pattern Name | [Name, e.g., Confirmation Dialog] |
| Category | [Navigation / Data Entry / Feedback / Disclosure / Selection / Layout] |
| Status | [Draft / Documented / Implemented / Deprecated] |
| Owner | [Designer and engineer responsible] |
| Related Components | [Components used, e.g., Modal, Button, Alert] |
| WAI-ARIA Pattern | [Reference, e.g., "Dialog (Modal)" from WAI-ARIA Authoring Practices, or N/A] |
| Last Updated | [Date] |
Description. [2-3 sentences. What interaction problem does this pattern solve? When does the user encounter it?]
When to Use
- ☐ [Scenario 1, e.g., "User is about to perform a destructive action that cannot be undone"]
- ☐ [Scenario 2, e.g., "Action has significant consequences the user should confirm"]
- ☐ [Scenario 3, e.g., "User needs to provide additional input before the action proceeds"]
When NOT to Use
- ☐ [Scenario where this pattern is wrong, e.g., "Low-stakes actions like closing a modal or toggling a setting. Use inline undo instead."]
- ☐ [Alternative pattern to use instead, with explanation]
- ☐ [Anti-pattern, e.g., "Never chain multiple confirmations. If the user confirms once, do not ask again."]
Pattern Anatomy
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ [Element 1, e.g., Trigger Button] โ
โ โ
โ [Element 2, e.g., Overlay/Backdrop] โ
โ โ
โ [Element 3, e.g., Dialog Content] โ
โ โโ [Sub-element, e.g., Title] โ
โ โโ [Sub-element, e.g., Message] โ
โ โโ [Sub-element, e.g., Actions] โ
โ โโ [Cancel Button] โ
โ โโ [Confirm Button] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Element descriptions:
| Element | Required | Description |
|---|---|---|
| [Element 1] | Yes/No | [What it is and what it does] |
| [Element 2] | Yes/No | [What it is and what it does] |
| [Element 3] | Yes/No | [What it is and what it does] |
Trigger and Action Map
| Trigger | Action | Feedback |
|---|---|---|
| [e.g., User clicks "Delete"] | [e.g., Confirmation dialog opens] | [e.g., Backdrop fades in, dialog scales up] |
| [e.g., User clicks "Confirm"] | [e.g., Item is deleted, dialog closes] | [e.g., Dialog scales down, toast appears "Item deleted"] |
| [e.g., User clicks "Cancel"] | [e.g., Dialog closes, no action taken] | [e.g., Dialog fades out, focus returns to trigger] |
| [e.g., User presses Escape] | [e.g., Same as Cancel] | [e.g., Same as Cancel] |
| [e.g., User clicks backdrop] | [e.g., Same as Cancel or nothing (specify)] | [...] |
State Transitions
| State | Entry Condition | Exit Condition | Visual |
|---|---|---|---|
| Idle | Default state | User triggers the pattern | [Trigger element is interactive, no overlay] |
| Active / Open | Pattern triggered | User completes or cancels | [Pattern elements visible, overlay active] |
| Loading | User confirms, async action in progress | Action succeeds or fails | [Confirm button shows spinner, other actions disabled] |
| Success | Async action completed | Automatic after delay | [Pattern closes, success feedback shown] |
| Error | Async action failed | User retries or cancels | [Error message displayed within pattern] |
State diagram:
[Idle] โโtriggerโโ> [Active]
^ โ
โ โโโโโโโโโโโค
โ โ โ
โ cancel confirm
โ โ โ
โ โ [Loading]
โ โ โ โ
โ โ success error
โ โ โ โ
โโโโโโโโโโโ [Success] [Error]
โ โ
โโโโโโโโโโโ> [Idle] (after dismiss/retry)
Keyboard Behavior
| Key | Action | Context |
|---|---|---|
| [e.g., Enter] | [e.g., Activates focused button] | [e.g., Within dialog] |
| [e.g., Escape] | [e.g., Closes dialog (same as Cancel)] | [e.g., While dialog is open] |
| [e.g., Tab] | [e.g., Moves focus to next interactive element] | [e.g., Focus trapped within dialog] |
| [e.g., Shift+Tab] | [e.g., Moves focus to previous interactive element] | [e.g., Focus trapped within dialog] |
| [e.g., Arrow keys] | [e.g., Not applicable / navigates options] | [...] |
Focus management:
| Event | Focus Behavior |
|---|---|
| Pattern opens | [e.g., Focus moves to first interactive element inside the pattern] |
| Pattern closes (confirm) | [e.g., Focus returns to the element that triggered the pattern] |
| Pattern closes (cancel) | [e.g., Focus returns to the trigger element] |
| Pattern closes (error) | [e.g., Focus stays within pattern, moves to error message] |
Accessibility Requirements
- ☐ [ARIA role and properties, e.g.,
role="dialog",aria-modal="true",aria-labelledby] - ☐ [Screen reader announcements, e.g., "Dialog title announced on open"]
- ☐ [Focus trapping, e.g., "Tab cycles within the dialog, does not escape to page"]
- ☐ [Reduced motion, e.g., "Open/close animations respect
prefers-reduced-motion"] - ☐ [High contrast mode, e.g., "All elements visible in Windows High Contrast Mode"]
- ☐ [Touch accessibility, e.g., "All touch targets 44x44px minimum"]
Responsive Adaptation
| Breakpoint | Adaptation |
|---|---|
| Desktop (1280px+) | [e.g., Dialog centered in viewport, max-width 480px] |
| Tablet (768px-1279px) | [e.g., Same as desktop, max-width 420px] |
| Mobile (< 768px) | [e.g., Dialog becomes bottom sheet, full width, slides up from bottom] |
Content Guidelines
| Element | Guideline | Good Example | Bad Example |
|---|---|---|---|
| [e.g., Dialog title] | [e.g., Question format, specific] | "Delete this project?" | "Confirm" |
| [e.g., Dialog message] | [e.g., Explain consequences] | "This will permanently delete 'Acme Roadmap' and all 24 items in it." | "Are you sure?" |
| [e.g., Confirm button] | [e.g., Verb matching the action] | "Delete Project" | "OK" |
| [e.g., Cancel button] | [e.g., Always "Cancel", no variations] | "Cancel" | "Go Back" |
Common Mistakes
| Mistake | Why It Is Wrong | Correct Approach |
|---|---|---|
| [e.g., Using confirmation for low-stakes actions] | [e.g., Adds friction without value; users click through without reading] | [e.g., Use inline undo for reversible actions] |
| [e.g., Generic "Are you sure?" message] | [e.g., User cannot evaluate consequences without specifics] | [e.g., State what will be deleted/changed and the impact] |
| [e.g., No loading state after confirm] | [e.g., User clicks confirm again thinking it did not register] | [e.g., Show spinner on confirm button, disable all actions] |
| [e.g., Focus not returned to trigger on close] | [e.g., Keyboard user loses their place on the page] | [e.g., Restore focus to the element that opened the pattern] |
Implementation Notes
[Framework-specific code snippets, hooks, or component composition examples]
[Include the key behavioral logic, not the full component code]
[Focus on the interaction flow, not the styling]
Filled Example: Search Combobox
Pattern Overview
| Field | Details |
|---|---|
| Pattern Name | Search Combobox |
| Category | Selection |
| Status | Documented |
| Related Components | TextInput, Popover, ListItem, Badge |
| WAI-ARIA Pattern | Combobox with Listbox Popup (APG) |
Description. The search combobox lets users type to filter a list of options and select one or more. It combines a text input with a dropdown results list. Used for entity search (users, projects, labels), command palettes, and any selection from a large set of options.
When to Use
- Selecting from a list of 10+ options where typing is faster than scrolling
- Entity lookup (searching for a user, project, or document by name)
- Tagging or labeling (applying one or more tags from a predefined set)
When NOT to Use
- Fewer than 7 options. Use a simple Select dropdown instead.
- Boolean choice. Use a toggle or radio group.
- Free-text input where no predefined options exist. Use a plain text input.
State Transitions
[Idle] โโfocus/clickโโ> [Open, Empty Input]
โ
type query
โ
[Open, Filtered Results]
โ โ
select item no results
โ โ
[Idle + Selected] [Open, Empty State]
Keyboard Behavior
| Key | Action |
|---|---|
| Arrow Down | Move highlight to next option |
| Arrow Up | Move highlight to previous option |
| Enter | Select highlighted option |
| Escape | Close dropdown, clear query |
| Backspace (empty input, multi-select) | Remove last selected item |
Accessibility
role="combobox"on the input,aria-expandedreflects open staterole="listbox"on the results list,role="option"on each itemaria-activedescendanton the input points to the highlighted option- Screen reader announces result count: "5 results available"
- Selected items in multi-select announced with
aria-selected="true"
Responsive Adaptation
Desktop: Dropdown positioned below input, max-height 300px with scroll. Mobile: Full-screen overlay with sticky input at top, full-height scrollable results.
Key Takeaways
- Patterns describe behavior across multiple components. They answer "how does this interaction work?" not "what does this element look like?"
- Include a state diagram for every pattern. Text descriptions alone leave ambiguity that diagrams resolve
- Document keyboard behavior and focus management for every state transition. These are the most commonly missed implementation details
- Always include "When NOT to use" to prevent pattern misapplication
- Test patterns at every breakpoint. A modal on desktop may need to become a bottom sheet on mobile
About This Template
Created by: Tim Adair
Last Updated: 3/5/2026
Version: 1.0.0
License: Free for personal and commercial use
