算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
app-ux-paradigms【设计与创意】Apply conventional interaction behavior for keyboard shortcuts, focus, dialogs, overlays, menus, forms, and asynchronous controls. Use when those interaction mechanics are being built or reviewed; do not use for general page aesthetics, information architecture, or visualization quality.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Match desktop-app and modern web conventions by default. Users should not need to hunt for close affordances or discover shortcuts only by accident.
Apply only the patterns relevant to the interaction being built or reviewed. This skill does not authorize unrelated UI changes, and its tables are defaults, not a product-wide acceptance checklist. Accessibility, prevention of unintended destructive action, and avoiding silent data loss remain blocking where the touched interaction creates those risks. Stop when the requested interaction works in its relevant input and state variants; report adjacent consistency improvements as follow-ups.
Pair with the sync-url-navigation skill for bookmarkable nav/filter state.
| Key / chord | Expected behavior |
|---|---|
| Esc | Close the topmost overlay: modal, drawer, popover, context menu, inline edit. Do not close if a destructive save is in flight—block Esc while saving or show a clear state. |
| ⌘/Ctrl+Enter | Submit primary form or send message in chat/composer (when focus is in a text field). |
| Enter | Submit single-line fields; in multi-line fields, Enter = newline unless Shift+Enter is documented as send. |
| ⌘/Ctrl+letter | Use for global toggles (e.g. ⌘/Ctrl+J = open assistant panel). Always support both metaKey (Mac) and ctrlKey (Windows/Linux). |
keydown listeners when an overlay opens; remove on unmount.event.preventDefault() on Esc when handling it so nested browser UI does not steal the key.title tooltips on icon buttons (e.g. Close (Esc)).<kbd> styling.!event.shiftKey / !event.altKey when the chord is specific (e.g. Ctrl+J vs Ctrl+Shift+K).| Pattern | Use when |
|---|---|
| ⌘/Ctrl+K | Command palette / quick open (if the app has one) |
| ⌘/Ctrl+Shift+K | Secondary global action (e.g. clear chat / reset context)—only if distinct from Ctrl+K |
| ? | Toggle keyboard shortcut help (when not typing in an input) |
| / | Focus search (when not in an input) |
| Paradigm | Expected behavior when applicable |
|---|---|
| Esc | Closes modal (see above). |
| Backdrop click | Clicking outside may close lightweight dialogs; keep explicit confirmation dialogs or forms with unsaved work open when dismissal would be unsafe. |
| × control | Top-right (or consistent corner), type="button", labeled title with Esc hint. |
| Click propagation | stopPropagation on panel content so inner clicks do not close. |
| Focus | Move focus into modal on open; return focus to trigger on close when practical. |
| Scroll | Lock or contain body scroll for full-screen overlays; allow scroll inside tall forms. |
Use a consistent close model across comparable overlays. Do not add every close mechanism when it would discard unsaved work or weaken an explicit confirmation.
mousedown on document).Saving….alert.Copied).data-visualization-quality.type="search" where appropriate.confirm(); never rely only on icon buttons.div onClick without role and keyboard support.title / aria-label on icon-only controls.Select only items relevant to the changed interaction. Unselected items are not failed gates, and a review request does not authorize implementation.
metaKey with no ctrlKey