Use this when you need to document the interaction patterns a product uses (or should use) -- loading behaviors, state transitions, feedback mechanisms, progressive disclosure, and microinteractions. Produces a pattern catalog that designers and engineers reference for consistency.
Related skills: Use
/component-specfor individual component documentation. Pair with/design-reviewto evaluate pattern usage in designs. Use/style-guidefor foundational design tokens.
Process
Step 1: Gather inputs
Ask the user to provide:
- Product or feature area -- what are we cataloging patterns for?
- Scope -- full product audit or specific flows?
- Existing patterns -- does the team have documented patterns? What's inconsistent?
- Design system -- is there a component library these patterns should align with?
- Platform -- web, mobile, or both? (Interaction patterns differ by platform)
Step 2: Identify patterns in use
Walk through the product or designs and catalog every distinct interaction pattern:
## Interaction Pattern Inventory -- {{product name}}
### Loading patterns
| Pattern | Where used | Implementation | Consistent? |
|---------|-----------|---------------|-------------|
| Spinner (blocking) | (screens) | (duration, placement) | Yes / No |
| Skeleton screen | (screens) | (shape matches content?) | Yes / No |
| Progressive loading | (screens) | (above-fold first, rest lazy) | Yes / No |
| Optimistic update | (actions) | (show success, rollback on failure) | Yes / No |
| Background refresh | (data) | (silent update, no UI disruption) | Yes / No |
### Feedback patterns
| Pattern | Where used | Implementation | Consistent? |
|---------|-----------|---------------|-------------|
| Toast notification | (actions) | (position, duration, dismissible?) | Yes / No |
| Inline validation | (forms) | (on blur, on submit, or real-time?) | Yes / No |
| Success confirmation | (actions) | (animation, text, auto-dismiss?) | Yes / No |
| Error display | (failures) | (inline, banner, modal?) | Yes / No |
| Progress indicator | (multi-step) | (bar, steps, percentage?) | Yes / No |
### Disclosure patterns
| Pattern | Where used | Implementation | Consistent? |
|---------|-----------|---------------|-------------|
| Accordion/expand | (content) | (single or multi-expand?) | Yes / No |
| Tooltip | (help text) | (hover, click, or focus trigger?) | Yes / No |
| Popover | (details) | (trigger, dismissal, mobile behavior?) | Yes / No |
| Modal/dialog | (decisions) | (focus trap, backdrop, escape to close?) | Yes / No |
| Drawer/panel | (secondary content) | (push or overlay? Responsive behavior?) | Yes / No |
### Navigation patterns
| Pattern | Where used | Implementation | Consistent? |
|---------|-----------|---------------|-------------|
| Tab switching | (content) | (keyboard arrows, URL updates?) | Yes / No |
| Pagination | (lists) | (numbered, load more, infinite scroll?) | Yes / No |
| Back/undo | (actions) | (browser back, in-app back, undo?) | Yes / No |
| Search/filter | (collections) | (instant, debounced, submit?) | Yes / No |
Step 3: Specify standard patterns
For each pattern category, define the standard behavior the product should follow:
## Pattern Specification: {{Pattern name}}
**When to use:** (Scenario that calls for this pattern)
**When NOT to use:** (Common misapplication)
### Behavior
- **Trigger:** (What initiates the pattern)
- **Duration:** (How long it lasts -- timing in ms if animated)
- **Transition:** (How it appears/disappears -- fade, slide, instant)
- **Dismissal:** (How the user exits -- click outside, escape, timer, explicit close)
### States
| State | Visual | Behavior |
|-------|--------|----------|
| Entering | (how it appears) | (what happens on entry) |
| Active | (steady state) | (user can interact with...) |
| Exiting | (how it leaves) | (what happens on exit) |
### Accessibility
- **Keyboard:** (how to trigger and dismiss)
- **Screen reader:** (what's announced)
- **Motion:** (respects prefers-reduced-motion?)
### Platform variations
| Platform | Difference |
|----------|-----------|
| Desktop | (default behavior) |
| Mobile | (touch-specific adaptation -- e.g., bottom sheet instead of dropdown) |
Step 4: Identify inconsistencies
## Consistency Report
### Inconsistencies found
| Pattern | Location A | Location B | Difference | Recommendation |
|---------|-----------|-----------|-----------|----------------|
| (pattern) | (screen) | (screen) | (how they differ) | Standardize to (version) |
### Missing patterns
- (Interaction that currently has no defined pattern -- e.g., "no standard for bulk selection")
Step 5: Review
Ask the user:
- Are these the right standard patterns for your product?
- Any patterns I missed or miscategorized?
- Does the team prefer any of the inconsistent implementations over others?
- Should I spec individual components from these patterns using
/component-spec?
Output location
Present the pattern library as formatted text in the conversation. For design system documentation, export to Notion, Storybook, or the team's pattern docs.
Example Output
Input
- Product or feature area: Meridian Health — patient-facing web app covering appointment booking, lab results, and secure messaging with care teams
- Scope: Full product audit across all three feature areas
- Existing patterns: Informal Figma component library exists but interaction behaviors are undocumented; engineering has noticed three different toast implementations and two different loading approaches across the app
- Design system: Internal "Meridian DS" built on top of Radix UI primitives; tokens are defined but motion/timing values are not
- Platform: Responsive web (desktop + mobile), no native apps
Output (abbreviated)
Interaction Pattern Library — Meridian Health Web App
Interaction Pattern Inventory
Loading Patterns
| Pattern | Where Used | Implementation | Consistent? |
|---|---|---|---|
| Spinner (blocking) | Appointment submission, message send | Centered overlay, no timeout defined | No |
| Skeleton screen | Lab results list, appointment history | Shape approximates content on results; generic bars on appointments | No |
| Progressive loading | Lab results detail (PDF preview) | Above-fold data loads first; PDF lazy | Yes |
| Optimistic update | Message send | Not implemented — waits for server confirmation | No |
| Background refresh | Lab results (polling for new results) | Silent, no UI disruption | Yes |
Feedback Patterns
| Pattern | Where Used | Implementation | Consistent? |
|---|---|---|---|
| Toast notification | Appointment confirmed, message sent, form errors | 3 implementations: top-right (booking), bottom-center (messaging), inline banner (lab results) | No |
| Inline validation | Appointment booking form, profile settings | On-submit only in booking; real-time in profile | No |
| Success confirmation | Appointment booked | Checkmark animation + auto-dismiss at 4s | Yes |
| Error display | API failures | Mix of modal (booking), inline banner (lab results), and console-only (messaging) | No |
| Progress indicator | Multi-step booking flow | Step tracker (3 steps), no percentage | Yes |
Disclosure Patterns
| Pattern | Where Used | Implementation | Consistent? |
|---|---|---|---|
| Accordion | Lab result reference ranges, FAQ | Single-expand only; no keyboard arrow support | No |
| Tooltip | Form field help text, lab result flags | Hover-only; breaks on mobile touch | No |
| Modal/dialog | Appointment cancel confirmation, document upload | Focus trap present in cancel; missing in upload | No |
| Drawer/panel | Messaging thread detail on mobile | Overlay (not push); no swipe-to-dismiss | No |
Pattern Specification: Toast Notification
When to use: Confirm a completed action (message sent, appointment booked, file uploaded) or surface a non-blocking system error that does not prevent the user from continuing.
When NOT to use: Critical errors requiring user action (use an inline error or modal instead). Do not use for persistent status like a degraded-service warning (use a banner).
Behavior
- Trigger: Action completion or system event (API response received)
- Duration: 5000ms for success/info; persistent (manual dismiss) for errors
- Transition: Slide up + fade in (200ms ease-out); slide down + fade out (150ms ease-in)
- Dismissal: Auto-dismiss on timer, or explicit close via × button; Escape key closes active toast
States
| State | Visual | Behavior |
|---|---|---|
| Entering | Slides up from bottom-right, opacity 0→1 | Pushes existing toasts upward; stacks max 3 |
| Active | Steady display with icon, message, and close button | User can click a link action if present (e.g., "View appointment") |
| Exiting | Slides down, opacity 1→0 | Stack reflows; lower toasts slide down to fill space |
Accessibility
- Keyboard: Escape dismisses focused toast; Tab moves focus into toast if it contains an action link
- Screen reader:
role="status"for success/info;role="alert"for errors; message announced on entry - Motion: Slide animation skipped when
prefers-reduced-motion: reduce; fade only
Platform Variations
| Platform | Behavior |
|---|---|
| Desktop (≥1024px) | Bottom-right, 320px wide, stacks vertically |
| Mobile (<1024px) | Bottom-center, full-width minus 16px margin each side; single toast visible at a time |
Pattern Specification: Inline Form Validation
When to use: Any form with fields where the validity of input can be evaluated before submission (email format, required fields, date constraints).
When NOT to use: Search inputs or filters where partial input is expected and normal.
Behavior
- Trigger: On blur (field loses focus) for format validation; on change (debounced 300ms) only for fields with a character counter or real-time constraint (e.g., message length)
- Duration: Persistent until field is corrected
- Transition: Error message fades in (150ms); field border transitions to
--color-error-borderin 100ms - Dismissal: Clears on blur after valid input is entered
States
| State | Visual | Behavior |
|---|---|---|
| Untouched | Default border, no message | No validation runs |
| Valid | --color-success-border, optional checkmark icon | Checkmark shown only on high-stakes fields (e.g., DOB, insurance ID) |
| Invalid | --color-error-border, red helper text below field | Error message replaces helper text; does not shift layout (reserved space) |
Accessibility
- Keyboard: Error message associated via
aria-describedby; field markedaria-invalid="true" - Screen reader: Error announced on blur; not announced on every keystroke
- Motion: No animation for error state — transition is color only
Consistency Report
Inconsistencies Found
| Pattern | Location A | Location B | Difference | Recommendation |
|---|---|---|---|---|
| Toast position | Appointment Booking (top-right) | Secure Messaging (bottom-center) | Position and entry direction differ | Standardize to bottom-right desktop / bottom-center mobile per spec above |
| Loading — skeleton vs. spinner | Lab Results list (skeleton) | Appointment History list (spinner, blocking) | Skeleton is less disruptive for list content | Migrate Appointment History to skeleton screen |
| Form validation timing | Profile Settings (real-time) | Appointment Booking (on-submit only) | On-submit delays error feedback; increases correction effort | Standardize to on-blur across all forms |
| Modal focus trap | Cancel Appointment (present) | Document Upload (absent) | Keyboard users can tab outside upload modal | Audit all modals; add focus trap via Radix Dialog primitive consistently |
| Tooltip trigger | Lab Results flags (hover) | None on mobile | Hover-only tooltips are inaccessible on touch | Switch to click/focus trigger with a visible tap target; consider replacing with inline help text for mobile |
Missing Patterns
- Bulk selection — No defined pattern for selecting multiple lab results or messages for bulk action (archive, download). Recommend adding a checkbox-select pattern with a sticky bulk-action bar.
- Empty states — No standard for zero-result views in messaging or lab results (no illustration, copy, or CTA guidance).
- Undo / destructive action recovery — Appointment cancellation is final with no undo window. Recommend a 5-second undo toast pattern before the cancellation is committed server-side.
- Optimistic updates for messaging — Currently blocking; spec an optimistic-send pattern with rollback on failure to reduce perceived latency.
Open Questions for Team Review
- Should the bulk-selection pattern be prioritized for the next sprint given the upcoming "Download Records" feature?
- Engineering preference on toast stack behavior — should new toasts appear on top or bottom of the stack?
- Does the design team want to keep the step-tracker progress indicator in booking, or migrate to a percentage bar to accommodate future flows with variable step counts?
- Should I generate a
/component-specfor the Toast and Modal components to lock down the Radix implementation details?