Interaction Design
Purpose
Design component interaction specs with all visual states, transitions, and accessibility requirements.
Scope Constraints
Reads component requirements, design system documentation, and platform guidelines for interaction analysis. Does not modify files or execute code. Does not access running applications or browser environments directly.
Inputs
- Component name and purpose
- Context where it appears (page, modal, sidebar, etc.)
- User actions it must support
- Existing design system or component library (if any)
- Platform constraints (web, mobile, both)
Input Sanitization
No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.
Procedure
Progress Checklist
Step 1: Define Component Purpose
- What job does this component do?
- What user need does it serve?
- Where does it appear in the UI hierarchy?
- What is the minimal viable version?
Step 2: Enumerate All Visual States
| State |
Visual Treatment |
When Active |
| Default/Rest |
Base styling |
No interaction |
| Hover |
Subtle highlight, cursor change |
Mouse over (desktop) |
| Focus |
Visible focus ring |
Keyboard navigation, tab |
| Active/Pressed |
Depressed/accent state |
Mouse down, touch |
| Loading/Pending |
Spinner, skeleton, disabled input |
Async operation in progress |
| Success/Confirmed |
Green accent, checkmark, brief flash |
Operation completed |
| Error/Invalid |
Red accent, error message, icon |
Validation failed, API error |
| Disabled |
Muted colors, no pointer events |
Precondition not met |
| Empty/Placeholder |
Placeholder text, illustration |
No data or content yet |
Step 3: Define Transitions Between States
For each state change:
- Trigger: What causes the transition (click, hover, data load, timer, keyboard)
- Animation: Duration and easing (subtle and purposeful, not gratuitous)
- Micro-interactions: 100-200ms
- State changes: 200-300ms
- Layout shifts: 300-500ms
- Feedback mechanism: Color change, icon swap, text update, motion
Step 4: Specify Accessibility Requirements
- ARIA roles and labels:
role attribute (button, dialog, alert, etc.)
aria-label or aria-labelledby for non-text elements
aria-describedby for supplementary descriptions
aria-live regions for dynamic updates
- Keyboard navigation:
- Tab order (logical, matches visual order)
- Enter/Space behavior (activate buttons, submit forms)
- Escape behavior (close modals, cancel operations)
- Arrow key behavior (navigate lists, tabs, menus)
- Screen reader announcements:
- State changes announced (loading, success, error)
- Dynamic content updates via
aria-live
- Visual accessibility:
- Color contrast: WCAG AA minimum (4.5:1 text, 3:1 UI elements)
- Focus indicators visible and high contrast
- Information not conveyed by color alone
Step 5: Define Responsive Behavior
- Desktop (1024px+):
- Full layout, hover interactions available
- Keyboard shortcuts active
- Tablet (768px - 1023px):
- Adjusted spacing, simplified hover states
- Touch-friendly but more screen real estate than mobile
- Mobile (< 768px):
- Touch targets minimum 44x44px
- Swipe gestures where appropriate
- Bottom-sheet instead of dropdown where needed
- Simplified layout, stacked elements
Step 6: Specify Content Constraints
- Character limits for labels, descriptions, error messages
- Truncation strategy (ellipsis, fade, wrap)
- Internationalization considerations (text expansion 30-50% for translations)
- Number formatting, date formatting
Compaction resilience: If context was lost during a long session, re-read the Inputs section to reconstruct what component is being designed, check the Progress Checklist for completed steps, then resume from the earliest incomplete step.
Output Format
State Matrix
| State |
Background |
Border |
Text |
Icon |
Cursor |
Shadow |
| Default |
... |
... |
... |
... |
... |
... |
| Hover |
... |
... |
... |
... |
... |
... |
| Focus |
... |
... |
... |
... |
... |
... |
| Active |
... |
... |
... |
... |
... |
... |
| Loading |
... |
... |
... |
... |
... |
... |
| Success |
... |
... |
... |
... |
... |
... |
| Error |
... |
... |
... |
... |
... |
... |
| Disabled |
... |
... |
... |
... |
... |
... |
Transition Diagram
[Default] ←→ [Hover] → [Active] → [Loading] → [Success]
↓ ↓
[Focus] [Error]
↓
[Active]
Accessibility Checklist
Component API
Props:
- variant: 'primary' | 'secondary' | 'ghost'
- size: 'sm' | 'md' | 'lg'
- disabled: boolean
- loading: boolean
- ...
Events:
- onClick / onPress
- onFocus / onBlur
- ...
Slots:
- icon (leading/trailing)
- children (content)
- ...
Handoff
- Hand off to journey-mapping if user flow analysis is needed for the broader context where the component appears.
- Hand off to craftsman/pattern-analysis if code implementation patterns are needed for the designed component.
Quality Checks
Evolution Notes
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: interaction-design-23description: Use when designing component interaction specs with visual states, transitions, and accessibility requirements. Covers state matrices, responsive behavior, ARIA compliance, and content constraints. Do not use for multi-step user journey mapping (use journey-mapping).4---56# Interaction Design78## Purpose910Design component interaction specs with all visual states, transitions, and accessibility requirements.1112## Scope Constraints1314Reads component requirements, design system documentation, and platform guidelines for interaction analysis. Does not modify files or execute code. Does not access running applications or browser environments directly.1516## Inputs1718- Component name and purpose19- Context where it appears (page, modal, sidebar, etc.)20- User actions it must support21- Existing design system or component library (if any)22- Platform constraints (web, mobile, both)2324## Input Sanitization2526No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.2728## Procedure2930### Progress Checklist31- [ ] Step 1: Define component purpose32- [ ] Step 2: Enumerate all visual states33- [ ] Step 3: Define transitions between states34- [ ] Step 4: Specify accessibility requirements35- [ ] Step 5: Define responsive behavior36- [ ] Step 6: Specify content constraints3738### Step 1: Define Component Purpose3940- What job does this component do?41- What user need does it serve?42- Where does it appear in the UI hierarchy?43- What is the minimal viable version?4445### Step 2: Enumerate All Visual States4647| State | Visual Treatment | When Active |48|-------|-----------------|-------------|49| Default/Rest | Base styling | No interaction |50| Hover | Subtle highlight, cursor change | Mouse over (desktop) |51| Focus | Visible focus ring | Keyboard navigation, tab |52| Active/Pressed | Depressed/accent state | Mouse down, touch |53| Loading/Pending | Spinner, skeleton, disabled input | Async operation in progress |54| Success/Confirmed | Green accent, checkmark, brief flash | Operation completed |55| Error/Invalid | Red accent, error message, icon | Validation failed, API error |56| Disabled | Muted colors, no pointer events | Precondition not met |57| Empty/Placeholder | Placeholder text, illustration | No data or content yet |5859### Step 3: Define Transitions Between States6061For each state change:62- **Trigger:** What causes the transition (click, hover, data load, timer, keyboard)63- **Animation:** Duration and easing (subtle and purposeful, not gratuitous)64 - Micro-interactions: 100-200ms65 - State changes: 200-300ms66 - Layout shifts: 300-500ms67- **Feedback mechanism:** Color change, icon swap, text update, motion6869### Step 4: Specify Accessibility Requirements7071- **ARIA roles and labels:**72 - `role` attribute (button, dialog, alert, etc.)73 - `aria-label` or `aria-labelledby` for non-text elements74 - `aria-describedby` for supplementary descriptions75 - `aria-live` regions for dynamic updates76- **Keyboard navigation:**77 - Tab order (logical, matches visual order)78 - Enter/Space behavior (activate buttons, submit forms)79 - Escape behavior (close modals, cancel operations)80 - Arrow key behavior (navigate lists, tabs, menus)81- **Screen reader announcements:**82 - State changes announced (loading, success, error)83 - Dynamic content updates via `aria-live`84- **Visual accessibility:**85 - Color contrast: WCAG AA minimum (4.5:1 text, 3:1 UI elements)86 - Focus indicators visible and high contrast87 - Information not conveyed by color alone8889### Step 5: Define Responsive Behavior9091- **Desktop (1024px+):**92 - Full layout, hover interactions available93 - Keyboard shortcuts active94- **Tablet (768px - 1023px):**95 - Adjusted spacing, simplified hover states96 - Touch-friendly but more screen real estate than mobile97- **Mobile (< 768px):**98 - Touch targets minimum 44x44px99 - Swipe gestures where appropriate100 - Bottom-sheet instead of dropdown where needed101 - Simplified layout, stacked elements102103### Step 6: Specify Content Constraints104105- Character limits for labels, descriptions, error messages106- Truncation strategy (ellipsis, fade, wrap)107- Internationalization considerations (text expansion 30-50% for translations)108- Number formatting, date formatting109110> **Compaction resilience**: If context was lost during a long session, re-read the Inputs section to reconstruct what component is being designed, check the Progress Checklist for completed steps, then resume from the earliest incomplete step.111112## Output Format113114### State Matrix115116| State | Background | Border | Text | Icon | Cursor | Shadow |117|-------|-----------|--------|------|------|--------|--------|118| Default | ... | ... | ... | ... | ... | ... |119| Hover | ... | ... | ... | ... | ... | ... |120| Focus | ... | ... | ... | ... | ... | ... |121| Active | ... | ... | ... | ... | ... | ... |122| Loading | ... | ... | ... | ... | ... | ... |123| Success | ... | ... | ... | ... | ... | ... |124| Error | ... | ... | ... | ... | ... | ... |125| Disabled | ... | ... | ... | ... | ... | ... |126127### Transition Diagram128129```130[Default] ←→ [Hover] → [Active] → [Loading] → [Success]131 ↓ ↓132 [Focus] [Error]133 ↓134 [Active]135```136137### Accessibility Checklist138139- [ ] ARIA role assigned140- [ ] ARIA label provided141- [ ] Keyboard operable (tab, enter, escape)142- [ ] Focus indicator visible143- [ ] Screen reader announces state changes144- [ ] Color contrast meets WCAG AA145- [ ] Touch targets >= 44x44px146147### Component API148149```150Props:151- variant: 'primary' | 'secondary' | 'ghost'152- size: 'sm' | 'md' | 'lg'153- disabled: boolean154- loading: boolean155- ...156157Events:158- onClick / onPress159- onFocus / onBlur160- ...161162Slots:163- icon (leading/trailing)164- children (content)165- ...166```167168## Handoff169170- Hand off to journey-mapping if user flow analysis is needed for the broader context where the component appears.171- Hand off to craftsman/pattern-analysis if code implementation patterns are needed for the designed component.172173## Quality Checks174175- [ ] All 8+ visual states defined (default, hover, focus, active, loading, success, error, disabled)176- [ ] Keyboard navigation specified for all interactive elements177- [ ] ARIA labels provided for all non-text elements178- [ ] Touch targets meet 44px minimum179- [ ] Loading and error states designed with recovery paths180- [ ] Empty/placeholder state designed181- [ ] Transitions are subtle and purposeful (not gratuitous)182- [ ] Responsive behavior specified for mobile, tablet, desktop183184## Evolution Notes185<!-- Observations appended after each use -->186187---188> Converted and distributed by [TomeVault](https://tomevault.io/claim/dtsong) — claim your Tome and manage your conversions.189<!-- tomevault:4.0:skill_md:2026-04-13 -->