--- name: -interaction-design description: Interaction design for the project. State surfaces (modal vs inline vs drawer vs full-page), motion philosophy, input modes (touch/mouse/keyboard), breakpoints, i18n posture, empty/loading/error/offline state postures, time formatting, and keyboard policy. Load and apply whenever building UI behavior — modals, forms, navigation, transitions, gestures, error handling, async states, focus management. Pairs with -design-system. --- # interaction design > **Status: ** > Generated by Composer's `ui-system` phase. Re-running that phase > updates this skill (with confirmation). ## How to use this skill When building UI *behavior* — anything beyond static styling — read this skill first. Don't invent new state-surface patterns, motion durations, or empty-state postures. They're declared once here and reused everywhere. For visual tokens (color, type, spacing), see the paired `-design-system` skill. ## Input modes | Mode | Status | |---|---| | Touch | | | Mouse | | | Keyboard | | | Voice | | ## State surfaces One pattern per action class. Used everywhere. | Action class | Pattern | Notes | |---|---|---| | Quick edit (single field) | inline edit | | | Multi-field create / edit | | | | Confirm destructive | modal | always | | Settings / configuration | full-page route | — | | Top-level navigation | | | | Detail-from-list | | | ## Motion - **Posture**: - **Default duration / easing**: see design-system tokens - **Reduced motion**: respected via `prefers-reduced-motion` everywhere; fallbacks declared per pattern below - **When things animate**: - Page/route transitions: - List item enter/exit: - Modal/drawer open/close: - State changes (toggle, expand): ## Breakpoints | Breakpoint | Range | Primary? | |---|---|---| | Phone | < | | | Tablet | | | | Desktop | ≥ | | **Primary design target**: ## i18n - **Locales at launch**: - **RTL support**: - **String length budget**: assume +30% over English for German/French translations - **Pluralization**: ## State postures One declared posture per state, used everywhere. No inventing on a per-screen basis. ### Empty - **Visual**: - **Tone**: - **CTA**: ### Loading - **Default pattern**: - **When to use which**: - **Threshold for showing loading at all**: ### Error - **Surface**: - **Recovery**: - **Copy tone**: ### Offline - **Behavior**: - **Sync semantics**: ## Time formatting - **Relative time** for events within: - **Absolute time** otherwise, format: - **Time zones**: - **Date-only vs date+time**: ## Keyboard - **Global shortcuts**: - **Within-modal**: `Esc` closes; focus trap while open; restore focus on close - **Tab order**: declared per-flow as needed; focus visible always (per design-system) - **Forms**: `Enter` submits; `Esc` cancels destructive - **Lists**: ## TBD on return -