@hegemonart/get-design-done 1.14.8 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/.claude-plugin/marketplace.json +5 -3
  2. package/.claude-plugin/plugin.json +15 -5
  3. package/CHANGELOG.md +97 -0
  4. package/README.md +30 -0
  5. package/SKILL.md +4 -1
  6. package/agents/a11y-mapper.md +25 -0
  7. package/agents/component-benchmark-harvester.md +112 -0
  8. package/agents/component-benchmark-synthesizer.md +88 -0
  9. package/agents/design-auditor.md +92 -8
  10. package/agents/design-context-builder.md +6 -0
  11. package/agents/design-executor.md +5 -2
  12. package/agents/design-pattern-mapper.md +2 -0
  13. package/agents/design-verifier.md +11 -0
  14. package/agents/motion-mapper.md +45 -0
  15. package/agents/token-mapper.md +36 -0
  16. package/agents/visual-hierarchy-mapper.md +29 -0
  17. package/connections/design-corpora.md +158 -0
  18. package/package.json +16 -2
  19. package/reference/anti-patterns.md +69 -0
  20. package/reference/audit-scoring.md +34 -3
  21. package/reference/brand-voice.md +199 -0
  22. package/reference/checklists.md +30 -3
  23. package/reference/components/README.md +90 -0
  24. package/reference/components/TEMPLATE.md +184 -0
  25. package/reference/components/accordion.md +217 -0
  26. package/reference/components/button.md +195 -0
  27. package/reference/components/card.md +200 -0
  28. package/reference/components/checkbox.md +207 -0
  29. package/reference/components/drawer.md +201 -0
  30. package/reference/components/input.md +208 -0
  31. package/reference/components/label.md +200 -0
  32. package/reference/components/link.md +193 -0
  33. package/reference/components/modal-dialog.md +210 -0
  34. package/reference/components/popover.md +197 -0
  35. package/reference/components/radio.md +203 -0
  36. package/reference/components/select-combobox.md +219 -0
  37. package/reference/components/switch.md +194 -0
  38. package/reference/components/tabs.md +213 -0
  39. package/reference/components/tooltip.md +201 -0
  40. package/reference/data/google-fonts.csv +51 -0
  41. package/reference/data/palettes.csv +41 -0
  42. package/reference/data/styles.csv +39 -0
  43. package/reference/design-system-guidance.md +177 -0
  44. package/reference/design-systems-catalog.md +151 -0
  45. package/reference/framer-motion-patterns.md +411 -0
  46. package/reference/gestalt.md +219 -0
  47. package/reference/iconography.md +231 -0
  48. package/reference/motion.md +102 -0
  49. package/reference/palette-catalog.md +82 -0
  50. package/reference/performance.md +304 -0
  51. package/reference/registry.json +359 -28
  52. package/reference/registry.schema.json +2 -1
  53. package/reference/review-format.md +2 -2
  54. package/reference/style-vocabulary.md +62 -0
  55. package/reference/surfaces.md +114 -0
  56. package/reference/typography.md +80 -0
  57. package/reference/visual-hierarchy-layout.md +306 -0
  58. package/skills/benchmark/SKILL.md +105 -0
@@ -0,0 +1,219 @@
1
+ # Gestalt Principles
2
+
3
+ <!-- UUPM ux-guidelines.csv rows deduped into this file and heuristics.md/anti-patterns.md/priority-matrix.md — see .planning/research/uupm-import/ux-guidelines-reconciliation.md -->
4
+ <!-- Source: nextlevelbuilder/ui-ux-pro-max-skill (MIT) — data/ux-guidelines.csv (deduped) -->
5
+
6
+ Gestalt psychology explains how the human visual system automatically organizes individual elements into coherent wholes. Designers who understand Gestalt principles can use them intentionally — grouping what belongs together, separating what is distinct, directing attention flow, and reducing cognitive effort. Designers who ignore these principles will inadvertently create layouts that confuse perception, because the visual system will apply Gestalt organization regardless of the designer's intent.
7
+
8
+ The eight principles below are not rules to follow in isolation — they interact. A single design decision often activates multiple principles simultaneously. The audit checklist at the end of this file helps identify where principles are being violated or underutilized.
9
+
10
+ ---
11
+
12
+ ## 1. Proximity
13
+
14
+ **Definition:** Elements that are physically close to each other are perceived as belonging to the same group, regardless of their visual appearance. Distance communicates separation; closeness communicates relationship.
15
+
16
+ **Design application:** Related controls — a label and its input, an action button and its target, a heading and its body text — should be separated by no more than 8px. Unrelated elements should be separated by at least 32px. When this discipline is applied consistently, users read the layout's meaning before reading its content: the structure itself communicates relationships. Proximity is the most fundamental grouping tool available, and it costs nothing but intentionality.
17
+
18
+ Proximity violations are among the most common layout defects. The symptom is a layout where users do not immediately know which label belongs to which input, or which button acts on which content area. The fix is almost always to increase the distance between unrelated groups and decrease the distance within groups.
19
+
20
+ **Scoring rubric — audit by looking for:**
21
+ - Label-to-input gap: should be ≤8px; flag anything ≥16px
22
+ - Button-to-target gap: a button that acts on a specific element should be adjacent to it, not floating at a distance
23
+ - Section separation: distinct content sections should be separated by ≥32px; flag sections that bleed into each other
24
+ - Orphaned elements: any element that has equal distance to two different groups is ambiguous and should be assigned
25
+
26
+ **CSS/HTML grep signatures:**
27
+ ```
28
+ gap-2 # ≤8px — appropriate for related elements
29
+ gap-8 # 32px — appropriate for section separation; flag if used between related elements
30
+ mb-8 # check if this is separating related or unrelated content
31
+ p-0 # elements with no internal padding may create proximity confusion at borders
32
+ ```
33
+
34
+ ---
35
+
36
+ ## 2. Similarity
37
+
38
+ **Definition:** Elements that share visual properties — color, shape, size, texture, or orientation — are perceived as belonging to the same category. The visual system uses similarity as a shortcut for classification: if it looks the same, it is the same kind of thing.
39
+
40
+ **Design application:** Consistency in visual treatment is not merely an aesthetic preference — it communicates semantic meaning. All primary buttons should look identical: same size, same color, same weight. All destructive actions should look identical: same red, same border treatment, same position relative to the confirm/cancel pair. All secondary navigation items should be visually indistinguishable from each other. When similar-role elements look different, users assume they are different kinds of things, which creates confusion and erodes trust in the interface's logic.
41
+
42
+ Icon weight is one of the most commonly violated similarity contexts. Mixing outline icons with filled icons signals two different visual registers that users will try to interpret as meaningful — even when the mixing is accidental.
43
+
44
+ **Scoring rubric — audit by looking for:**
45
+ - Button variants: are all primary buttons identical? Are all secondary buttons identical? Flag mixed variants on the same screen.
46
+ - Icon weight: are all icons from the same weight family (all outline or all filled)? Flag mixing.
47
+ - List items: do all items in a list have identical visual treatment? Flag items that are visually distinct without a semantic reason.
48
+ - Form fields: are all text inputs styled identically? Flag inconsistencies.
49
+
50
+ **CSS/HTML grep signatures:**
51
+ ```
52
+ btn-primary.*btn-secondary # flag if both appear in same component with identical visual weight
53
+ icon-outline.*icon-filled # flag mixed icon weight patterns
54
+ variant="primary" # audit all variant prop usages for consistency
55
+ ```
56
+
57
+ ---
58
+
59
+ ## 3. Continuity
60
+
61
+ **Definition:** The eye naturally follows lines, curves, and paths in the direction they are already moving. When elements are aligned along an invisible axis, the eye connects them into a continuous flow and expects the line to continue.
62
+
63
+ **Design application:** Use alignment to create invisible flow lines that direct the eye through the layout in the intended sequence. Left-aligned content columns create a strong left-edge flow line that the eye tracks downward. A row of icons creates a horizontal flow line. A step indicator with connected segments creates a continuous path that the eye follows from start to finish. Carousels and horizontal scrollers leverage continuity by partially revealing the next item — the visible edge implies that more content continues in the same direction.
64
+
65
+ Continuity is disrupted when elements break expected alignment without a purposeful reason. An element that juts out of an otherwise aligned column creates a visual interrupt — which can be used intentionally to draw attention, or accidentally to create confusion.
66
+
67
+ **Scoring rubric — audit by looking for:**
68
+ - Alignment consistency: are all left-aligned elements aligned to the same grid column? Flag arbitrary left-offset elements.
69
+ - Step indicators: does the visual path between steps flow clearly? Flag broken or visually interrupted step flows.
70
+ - Carousel edge reveals: does the last visible item partially reveal the next? Flag carousels that do not imply continuation.
71
+ - Broken columns: are there elements that break column alignment without a documented reason?
72
+
73
+ **CSS/HTML grep signatures:**
74
+ ```
75
+ ml-auto # right-alignment break — check if intentional
76
+ text-center # mixed with text-left in same flow — flag if alignment signal is inconsistent
77
+ translate-x # horizontal animation — verify it implies continuity, not arbitrary motion
78
+ ```
79
+
80
+ ---
81
+
82
+ ## 4. Closure
83
+
84
+ **Definition:** The human visual system actively completes incomplete shapes, filling in missing information to perceive a whole. Users will "see" a rectangle even if its corners are open, or a circle even if its arc is broken, because the mind prefers complete, recognizable forms over fragments.
85
+
86
+ **Design application:** Closure is widely used in logos and icons to create forms that feel complete while being visually light. In UI, closure explains why partial borders can suggest containment without a full rectangle: a top border on a card, or a left border on a quoted text block, implies a region even without three additional sides. Progress indicators with open ends imply continuation; closed rings imply completion. Skeleton loading states use closure — partial shapes that the user's mind completes as content — to make loading feel purposeful rather than empty.
87
+
88
+ Closure can also be violated: a progress bar that ends before reaching the container's right edge correctly communicates incompletion, but if it ends at an arbitrary position with no visual context, users may perceive a broken UI rather than a progress state.
89
+
90
+ **Scoring rubric — audit by looking for:**
91
+ - Progress indicators: does the fill/track relationship clearly communicate completion percentage? Flag indicators where progress direction is ambiguous.
92
+ - Partial borders: do partial borders clearly imply the group they define? Flag partial borders that could be mistaken for decorative rules.
93
+ - Skeleton states: do skeleton shapes meaningfully correspond to the content they represent? Flag skeletons that are too abstract to prime recognition.
94
+ - Logo/icon edges: do open edges in icons close convincingly at standard display sizes?
95
+
96
+ **CSS/HTML grep signatures:**
97
+ ```
98
+ border-l # left-only border — check if closure context is clear
99
+ border-t # top-only border — check if closure context is clear
100
+ rounded-full # complete closure (circle/pill) — appropriate for completion states
101
+ w-1/2 # partial fill — verify progress context is established by container
102
+ ```
103
+
104
+ ---
105
+
106
+ ## 5. Figure-Ground
107
+
108
+ **Definition:** The visual system constantly distinguishes between a subject (figure) and its context (ground). Figures are perceived as having form, existing in front, and being the focus of attention. Ground is perceived as formless, behind, and non-focal. This distinction happens automatically and is fundamental to perceiving anything at all.
109
+
110
+ **Design application:** Every interactive element, content region, and overlay depends on successful figure-ground separation. Modal dialogs work because the scrim pushes the page content to ground and the dialog to figure. Buttons work because their filled background distinguishes them from the text-on-ground surrounding them. Navigation bars work because their elevated background separates them from the page content they sit above.
111
+
112
+ The practical rule: foreground elements must have at least 3:1 contrast ratio against their background, and for text, 4.5:1 for body text (WCAG AA). But figure-ground extends beyond contrast — blur, shadow, and opacity all contribute. A high-contrast element on a cluttered background may still fail to read as figure if the background is too visually active.
113
+
114
+ **Scoring rubric — audit by looking for:**
115
+ - Modal scrim: is the background content pushed to ground with sufficient opacity or blur? Flag modals where the page behind is at full visibility and full saturation.
116
+ - Button states: do buttons clearly read as figure against all surface colors they appear on? Flag buttons with insufficient background contrast.
117
+ - Active navigation items: are selected/active states clearly distinguished from non-selected? Flag flat navigation with only a color difference.
118
+ - Card separation: do cards separate from the page surface? Flag cards with no shadow, border, or background differentiation.
119
+
120
+ **CSS/HTML grep signatures:**
121
+ ```
122
+ bg-white.*text-white # invisibility risk — figure and ground collapsed
123
+ bg-black/50 # modal scrim — verify opacity is sufficient
124
+ z-index|z-[0-9] # stacking context — verify figure-ground intent is preserved
125
+ opacity-0.*opacity-100 # transition — verify figure emerges cleanly from ground
126
+ ```
127
+
128
+ ---
129
+
130
+ ## 6. Common Fate
131
+
132
+ **Definition:** Elements that move together — in the same direction, at the same speed, and with the same timing — are perceived as belonging to the same group, even if they are spatially separated. Movement is a powerful grouping signal precisely because it overrides static proximity and similarity cues.
133
+
134
+ **Design application:** When a group of elements should be perceived as a unit, animate them with shared timing. A card that expands while its child elements simultaneously rearrange communicates that the card and its contents are one object. A list that reorders with synchronized item movement communicates that the list is a coherent set. Conversely, animating elements at different speeds signals that they are independent objects — which can be used to establish hierarchy (parent first, then children) by staggering their entrance timing.
135
+
136
+ Staggered animation (where sub-elements enter sequentially with a small delay) is a specific application of common fate that establishes a visual hierarchy within a group: the first element that moves is perceived as most important, and the trailing elements are perceived as its dependents.
137
+
138
+ **Scoring rubric — audit by looking for:**
139
+ - Group animations: when a container appears or changes, do its children animate with it or independently? Flag children that animate on unrelated timings.
140
+ - List reorder: when items reorder, do they move with shared timing that communicates the reorder as one operation? Flag lists where individual items move asynchronously.
141
+ - Exit animations: when a group exits, do all elements leave together? Flag cases where parts of a group exit before the container.
142
+
143
+ **CSS/HTML grep signatures:**
144
+ ```
145
+ transition-all # check if used on group container vs. children separately
146
+ stagger # check stagger timing for hierarchy signal
147
+ animate-*.*animate-* # multiple simultaneous animations — verify they share timing
148
+ delay-[0-9] # stagger implementation — verify delay communicates hierarchy
149
+ ```
150
+
151
+ ---
152
+
153
+ ## 7. Common Region
154
+
155
+ **Definition:** Elements enclosed within a clearly defined boundary — a border, a background color, a shadow, or any other perceptual container — are perceived as belonging to the same group, even if they are not close to each other. Common region overrides proximity: two elements far apart within the same bounded region are perceived as more related than two elements close together on either side of a region boundary.
156
+
157
+ **Design application:** Cards, panels, table rows, form field groups, and toolbars all leverage common region by using visual boundaries to say "these things go together." The boundary does not need to be a literal border — a distinct background color works equally well. This is why alternating row colors in a data table immediately communicate that each row is a distinct unit, and why a card with a white background on a grey page surface reads as a contained group without needing a border.
158
+
159
+ Common region is also useful for communicating hierarchy: nested regions (a card within a page, a sub-section within a card) communicate nested relationships. The visual boundary at each level tells the eye exactly how far a group extends.
160
+
161
+ **Scoring rubric — audit by looking for:**
162
+ - Card boundaries: do cards have a visible boundary (shadow, border, or background) that clearly separates them from their surroundings? Flag cards that blend into the page surface.
163
+ - Form groups: are related form fields visually grouped within a shared container? Flag forms where field groups are separated only by vertical spacing without a region signal.
164
+ - Table rows: are table rows distinguishable as individual regions? Flag tables with no row separation signal.
165
+ - Nested regions: are nested groupings visually distinguishable from their parent container?
166
+
167
+ **CSS/HTML grep signatures:**
168
+ ```
169
+ rounded.*shadow # card pattern — verify region boundary is sufficient
170
+ bg-gray-50.*bg-white # alternating region backgrounds — appropriate for table rows, list items
171
+ border.*rounded # explicit region boundary — verify visual weight is appropriate for nesting level
172
+ divide-y # table row divider — check if combined with sufficient vertical padding
173
+ ```
174
+
175
+ ---
176
+
177
+ ## 8. Prägnanz (Law of Simplicity)
178
+
179
+ **Definition:** The visual system always interprets ambiguous inputs in the simplest possible way. When multiple interpretations of a visual input are possible, the mind chooses the interpretation that requires the least cognitive work. Complexity is resolved toward simplicity automatically.
180
+
181
+ **Design application:** Prefer simple, recognizable shapes over complex, irregular ones. Remove any visual element that does not communicate something. Every decoration that does not carry meaning adds to the cognitive load the user must process before reaching the content that actually matters. This is the principle behind minimalism in UI design — not because minimalism is aesthetically superior, but because unnecessary visual complexity consumes perceptual resources that should be directed at the interface's actual purpose.
182
+
183
+ Prägnanz also implies that when two layouts can communicate the same information, the simpler one is better. A three-color palette is simpler to parse than a seven-color palette, even if the seven-color palette is "more interesting." A consistent component structure is simpler to navigate than a varied one, even if the variation is intentional.
184
+
185
+ **Scoring rubric — audit by looking for:**
186
+ - Decorative elements: identify any visual element that serves no communicative purpose. Flag gradients, textures, and ornamental icons that do not carry semantic meaning.
187
+ - Color count: how many distinct colors appear on a single screen? Flag screens with more than 4–5 distinct colors where the additional colors are not semantically required.
188
+ - Shadow and border redundancy: are both shadow and border used simultaneously on the same element without a reason? Flag redundant depth cues.
189
+ - Animation without purpose: identify any animation that does not communicate state change, progress, or relationship. Flag animations that exist for decoration alone.
190
+
191
+ **CSS/HTML grep signatures:**
192
+ ```
193
+ bg-gradient # decorative gradient — verify it communicates something
194
+ border.*shadow # redundant boundary signals — flag unless both serve distinct purposes
195
+ animate-bounce # decorative animation — flag if it does not communicate a meaningful state
196
+ after:.*before: # pseudo-element decorations — verify each is communicative
197
+ ```
198
+
199
+ ---
200
+
201
+ ## Gestalt Audit Checklist
202
+
203
+ Use this checklist when auditing a screen for Gestalt compliance. Each item maps to one or more principles.
204
+
205
+ 1. **Proximity check:** Can you identify every visual group by spacing alone, without relying on borders or background colors? Related elements should cluster tightly (≤8px); unrelated groups should breathe apart (≥32px). Flag any element where group membership is ambiguous from spacing alone.
206
+
207
+ 2. **Similarity check:** Do all elements of the same semantic role share identical visual treatment? Primary buttons match primary buttons. Destructive actions match destructive actions. Icons use consistent weight. Flag any visual inconsistency that users might interpret as a semantic difference.
208
+
209
+ 3. **Continuity check:** Does the layout create a clear reading path through its most important content? Can you trace an invisible line — horizontal, vertical, or diagonal — that connects the primary focal points in intended viewing order? Flag layouts where the reading path requires backtracking.
210
+
211
+ 4. **Closure check:** Are any incomplete shapes used? If so, do they close convincingly at the display size and resolution? Do progress indicators clearly communicate fill direction and completion scale? Flag ambiguous incomplete shapes.
212
+
213
+ 5. **Figure-ground check:** Does every interactive element have sufficient contrast against its background? Do modals and overlays effectively push page content to ground? Are active navigation states clearly elevated above inactive ones? Flag anything where figure and ground are insufficiently distinct.
214
+
215
+ 6. **Common fate check:** When elements animate, do grouped elements share timing? Is stagger used intentionally to signal hierarchy rather than arbitrarily? Flag groups where member elements animate independently with no shared timing.
216
+
217
+ 7. **Common region check:** Are all logically related groups of elements contained within a visible boundary (card, panel, background, or border)? Can a user identify group membership from the region boundary alone? Flag groups that rely only on proximity without a region signal in contexts where the proximity alone is insufficient.
218
+
219
+ 8. **Prägnanz check:** Remove one element at a time and ask: does the screen communicate less information without it? If the answer is no for any element, that element is decorative noise. Flag decorative elements, redundant visual signals, and any source of visual complexity that does not carry proportionate communicative value.
@@ -0,0 +1,231 @@
1
+ # Iconography — Reference Guide
2
+
3
+ Icons are a precise visual language. Every sizing, weight, metaphor, and accessibility decision either reinforces or undermines the system's communicative intent. This reference establishes canonical rules for icon usage across the get-design-done framework.
4
+
5
+ ---
6
+
7
+ ## 1. Optical Sizing & Stroke Weight
8
+
9
+ Icons are not scalable art objects that merely get bigger — they are optical instruments tuned to specific viewing contexts. A 16px icon rendered with the same stroke weight as a 32px icon will look fragile and thin at small sizes, because the eye perceives stroke weight relative to the overall icon bounding box.
10
+
11
+ **Canonical stroke weights by icon size:**
12
+
13
+ | Icon size | Recommended stroke | Why |
14
+ |-----------|-------------------|-----|
15
+ | 16px | 1.5px | At 16px, a 1px stroke disappears on most non-retina displays; 1.5px gives enough mass without filling the internal counter spaces |
16
+ | 20px | 1.5–2px | Transition size — match the body text weight; if using medium-weight body copy, lean toward 2px |
17
+ | 24px | 2px | The most common "default" icon grid. 2px is the industry convention (Lucide, Heroicons, Feather all default here) |
18
+ | 32px | 2–2.5px | Larger icons need more weight to avoid looking drawn with a fine pen against the heavier surrounding UI |
19
+ | 48px+ | 2.5–3px | Display-size icons (app icons, hero illustrations) should be optically balanced to read boldly at distance |
20
+
21
+ **Pixel alignment rules:** Icons on an even grid (16px, 24px, 32px) align their strokes to whole pixels. Icons on an odd grid (20px, 28px) should have strokes centered on 0.5px boundaries to avoid sub-pixel blur on non-retina displays. For SVG exports, always set `shape-rendering: crispEdges` on icon wrappers, and center the viewBox exactly on the pixel grid (e.g., `viewBox="0 0 24 24"`, not `"0.5 0.5 23 23"`). A stroke centered on the path boundary will anti-alias; a stroke offset by 0.5px will render sharply.
22
+
23
+ ---
24
+
25
+ ## 2. Weight & Stroke Consistency
26
+
27
+ Never mix stroke weights within the same UI surface. Mixing a 1.5px outline icon next to a 2px icon in the same toolbar creates a visual discord that users register as "something feels off" even if they cannot articulate why. The eye calibrates to a baseline weight, and deviations feel like errors.
28
+
29
+ **The typography matching principle:** Icon weight should correspond to the surrounding text weight. A regular-weight body paragraph (400) pairs with a regular or medium icon (1.5–2px stroke). A bold heading (700) pairs with a bold or filled icon variant. This alignment creates a perception of visual kinship — the icon "belongs" to the text alongside it rather than floating in from a different design register.
30
+
31
+ **Practical rule:** Choose one icon library per product surface and use it exclusively. If a specific icon is unavailable in your chosen library, draw it using the same stroke grammar rather than importing a single icon from a different library. The visual inconsistency of mixing libraries is nearly always worse than an imperfect icon from the right library.
32
+
33
+ ---
34
+
35
+ ## 3. Metaphor Taxonomy
36
+
37
+ Icons communicate meaning through shared cultural metaphors. Understanding the four functional categories prevents category errors — using a navigation metaphor for an action, or a status metaphor for wayfinding.
38
+
39
+ ### Functional (Action) Icons
40
+
41
+ Functional icons represent user-initiated operations: save, delete, copy, filter, sort, upload, download. They answer the question "what can I do here?" Their metaphors must be action-verifiable — a user looking at the icon should be able to predict the outcome of clicking it. The floppy disk for "save" is a dead metaphor that persists by convention, not visual logic; prefer more literal representations (cloud-upload for cloud save, checkmark-circle for "mark complete") where the action is unambiguous without cultural baggage.
42
+
43
+ **Recognition test:** Cover the label. Can a first-time user accurately predict what clicking this icon will do? If fewer than 80% of testers answer correctly in usability studies, pair the icon with a text label.
44
+
45
+ ### Status Icons
46
+
47
+ Status icons communicate system state: success, warning, error, loading, offline, syncing. They answer "what is the system telling me?" Their metaphors are highly convention-bound: green circle-check for success, yellow triangle-exclamation for warning, red circle-X for error. Deviating from these conventions introduces cognitive load — users must re-learn your system's visual language rather than drawing on years of software experience.
48
+
49
+ **When to use:** Status icons appear adjacent to data fields, system messages, toast notifications, and form validation. They must never be used as the sole indicator of status for users with color vision deficiency — always pair with a distinct shape and a text description.
50
+
51
+ ### Navigation (Wayfinding) Icons
52
+
53
+ Navigation icons orient users within an information space: home, back, forward, menu, close, external-link, settings. They answer "where am I and how do I move?" Their metaphors are cartographic and gestural — arrows indicate direction of travel, the house represents the origin point, the hamburger menu represents a collapsed list.
54
+
55
+ **When to use:** Navigation icons appear in navbars, breadcrumbs, sidebars, and dialog controls. Because wayfinding is critical to task completion, navigation icons should almost always be paired with visible labels until the product has established enough user familiarity to support icon-only navigation (typically after repeated-use screens with power users).
56
+
57
+ ### Brand Icons
58
+
59
+ Brand icons represent identity: logos, product wordmarks, social platform logos, and payment method marks. They follow the brand owner's guidelines, not the product's icon system. Never apply your system's stroke weight or color palette to third-party brand marks — use the official SVG assets. Brand icons communicate "who or what" rather than action, status, or direction.
60
+
61
+ **Source: nextlevelbuilder/ui-ux-pro-max-skill (MIT) — data/icons.csv**
62
+
63
+ ---
64
+
65
+ ## 4. Dark-Mode Icon Variants
66
+
67
+ A common mistake is inverting an icon library's default black strokes to `#FFFFFF` in dark mode. Pure white icons on dark backgrounds produce harsh contrast that reads as aggressive, particularly for secondary and tertiary actions. More importantly, pure white does not participate in the opacity token system that controls visual hierarchy.
68
+
69
+ **Use opacity tokens, not white fills.** The correct approach is to define icon colors using a semantic token (`--icon-default`, `--icon-secondary`, `--icon-disabled`) and resolve those tokens differently per color scheme:
70
+
71
+ ```css
72
+ :root {
73
+ --icon-default: oklch(0.15 0 0); /* near-black */
74
+ --icon-secondary: oklch(0.45 0 0); /* mid-gray */
75
+ --icon-disabled: oklch(0.70 0 0 / 0.4);
76
+ }
77
+
78
+ [data-theme="dark"] {
79
+ --icon-default: oklch(0.92 0 0); /* near-white, not pure */
80
+ --icon-secondary: oklch(0.65 0 0);
81
+ --icon-disabled: oklch(0.40 0 0 / 0.4);
82
+ }
83
+ ```
84
+
85
+ **Icon-on-color contrast rules:** When placing a white icon on a brand primary background (e.g., a white checkmark inside a colored button), the contrast ratio between the icon color and the background must meet WCAG 2.1 AA minimum of 4.5:1 for icons associated with text-size equivalents, and 3:1 for large-scale graphical elements (per WCAG 1.4.11 Non-text Contrast). Use the APCA method for more perceptually accurate contrast estimation in complex color environments.
86
+
87
+ ---
88
+
89
+ ## 5. Icon Animation Guidelines
90
+
91
+ Animated icons communicate state transitions — they are not decorative flourishes. Every animation should signal a specific semantic event: a state change the user caused, a process completing, or feedback confirming an action.
92
+
93
+ **Morphing between states (cross-fade pattern):**
94
+
95
+ When transitioning between two icons (e.g., play → pause, bookmark-outline → bookmark-filled), use the following three-property animation. The outgoing icon exits while the incoming icon enters simultaneously:
96
+
97
+ ```css
98
+ /* Outgoing icon */
99
+ .icon-exit {
100
+ animation: icon-exit 150ms ease-in forwards;
101
+ }
102
+ @keyframes icon-exit {
103
+ from { opacity: 1; transform: scale(1); filter: blur(0px); }
104
+ to { opacity: 0; transform: scale(0.75); filter: blur(4px); }
105
+ }
106
+
107
+ /* Incoming icon */
108
+ .icon-enter {
109
+ animation: icon-enter 200ms ease-out forwards;
110
+ animation-delay: 100ms;
111
+ }
112
+ @keyframes icon-enter {
113
+ from { opacity: 0; transform: scale(0.25); filter: blur(4px); }
114
+ to { opacity: 1; transform: scale(1); filter: blur(0px); }
115
+ }
116
+ ```
117
+
118
+ This pattern (scale 0.25→1, opacity 0→1, blur 4→0) creates a "materialization" feel that communicates emergence — the new state is coming into existence rather than simply swapping. Duration should be 150–200ms; shorter feels mechanical, longer feels sluggish.
119
+
120
+ **Rotation for loading states:** A continuous 360° rotation at 700–900ms per revolution communicates "waiting for external process." Use `animation-timing-function: linear` — easing causes visual pulsing that reads as multiple distinct events rather than a continuous state. The rotation axis must be the center of the icon's bounding box.
121
+
122
+ **Entrance for success states:** A success icon (checkmark, circle-check) should entrance with a brief overshoot — scale from 0 to 1.1 then settle to 1.0 — over 250–300ms using a spring-like timing function (`cubic-bezier(0.175, 0.885, 0.32, 1.275)`). This micro-bounce communicates "confirmed" rather than merely "appeared."
123
+
124
+ **Respect prefers-reduced-motion:** All icon animations must be disabled or reduced to an instant opacity transition when `@media (prefers-reduced-motion: reduce)` is active.
125
+
126
+ ---
127
+
128
+ ## 6. Semantic vs. Decorative Labeling
129
+
130
+ The single most common accessibility error in icon implementation is failing to distinguish between semantic icons (conveying meaning) and decorative icons (providing visual accompaniment to text that already conveys the meaning).
131
+
132
+ **Semantic (interactive standalone) icons require `aria-label`:**
133
+
134
+ ```html
135
+ <!-- Icon-only button — meaning conveyed solely by icon -->
136
+ <button aria-label="Delete item">
137
+ <svg aria-hidden="true" focusable="false"><!-- trash icon --></svg>
138
+ </button>
139
+ ```
140
+
141
+ The `aria-label` on the button describes the action. The SVG itself receives `aria-hidden="true"` to prevent screen readers from announcing "svg" or the icon's internal text elements. Never rely on `title` elements within SVG for accessible names in interactive contexts — browser support is inconsistent.
142
+
143
+ **Decorative icons require `aria-hidden="true"`:**
144
+
145
+ ```html
146
+ <!-- Icon accompanies visible label — purely decorative -->
147
+ <button>
148
+ <svg aria-hidden="true" focusable="false"><!-- search icon --></svg>
149
+ Search
150
+ </button>
151
+ ```
152
+
153
+ When visible text already conveys the full meaning, the icon is decorative. Hiding it from the accessibility tree prevents redundant announcements ("search graphic, search button").
154
+
155
+ **Never use a standalone icon as the sole affordance for critical or destructive actions.** Even if the icon is well-recognized (trash = delete), critical actions like permanent deletion, payment confirmation, or account changes must always pair the icon with a visible text label. The cost of an unclear icon on a destructive action is irreversible user harm.
156
+
157
+ ---
158
+
159
+ ## 7. Touch Target Pairing
160
+
161
+ Visual icon size and interactive touch target size are different concerns. A 16px icon is visually appropriate for compact UI contexts, but an interactive area of 16×16px fails accessibility and usability standards — fingers are much larger than icons.
162
+
163
+ **Minimum interactive touch targets:**
164
+
165
+ | Context | Minimum target | Rationale |
166
+ |---------|---------------|-----------|
167
+ | Standard interactive icon | 40×40px | WCAG 2.5.5 Target Size AAA; Apple HIG minimum |
168
+ | Primary action icon | 48×48px | Material Design 3 recommendation for primary actions |
169
+ | Dense data tables | 32×32px | Acceptable for expert-user interfaces with high density requirements |
170
+
171
+ **Implementation with `::after` pseudo-element:**
172
+
173
+ This technique extends the clickable area without changing the visual icon size:
174
+
175
+ ```css
176
+ .icon-button {
177
+ position: relative;
178
+ width: 20px;
179
+ height: 20px;
180
+ }
181
+
182
+ .icon-button::after {
183
+ content: '';
184
+ position: absolute;
185
+ top: 50%;
186
+ left: 50%;
187
+ transform: translate(-50%, -50%);
188
+ width: 40px;
189
+ height: 40px;
190
+ /* Optionally: background: transparent; border-radius: 50%; */
191
+ }
192
+ ```
193
+
194
+ The visual icon remains 20px; the interactive zone expands to 40px. On touch devices, this satisfies pointer accuracy requirements without creating visual padding that disrupts layout density.
195
+
196
+ ---
197
+
198
+ ## 8. Public Icon Library Catalog
199
+
200
+ Choosing an icon library is an architectural decision — all icons in a product surface should come from a single library to ensure stroke weight and visual grammar consistency. These are the major open-source libraries with their key characteristics.
201
+
202
+ ### Lucide Icons
203
+ Over 1,000 icons under the MIT license. Stroke-based with a consistent 2px stroke weight on a 24px grid. This is the default icon library for shadcn/ui components and has become the de facto standard for React-based design systems. Strong community maintenance with frequent additions. Import individual icons by name to enable tree-shaking: `import { ChevronRight } from 'lucide-react'`. Never import the entire library — the barrel export will bloat bundles.
204
+
205
+ ### Phosphor Icons
206
+ Available in six weights — thin, light, regular, bold, fill, and duotone — making it one of the most expressive icon systems available. MIT licensed. Ideal for products where visual hierarchy needs to be communicated through icon weight variation (e.g., active nav item uses bold, inactive uses regular). The duotone variant provides a two-tone fill that works well in marketing and onboarding contexts.
207
+
208
+ ### Heroicons
209
+ Produced by the Tailwind CSS team. Available in outline and solid variants on a 24px grid. MIT licensed. The outline variant is a 1.5px stroke, which is slightly lighter than Lucide's 2px — choose based on whether your typography leans toward light or regular weight. First-class Tailwind integration and React/Vue packages available.
210
+
211
+ ### Radix Icons
212
+ Designed specifically for the 15px grid rather than the standard 24px grid, making Radix Icons uniquely suited for dense, compact UI contexts — form fields, inline badges, data table actions. They pair directly with Radix UI primitives and share the same design philosophy: functional, unobtrusive, and predictable. MIT licensed.
213
+
214
+ ### Tabler Icons
215
+ Over 3,000 icons with a consistent 2px stroke on a 24px grid. The largest coherent stroke-based icon set available. MIT licensed. Excellent for applications requiring coverage of unusual domains (medical, scientific, geographic) that other libraries do not address. Actively maintained with SVG optimization.
216
+
217
+ ### Iconoir
218
+ Clean, minimal line icons on a 24px grid. MIT licensed. Characterized by a slightly rounded stroke termination that gives it a friendlier character than more angular systems. Well-suited for consumer-facing applications where the brand tonality is approachable and modern rather than corporate or technical.
219
+
220
+ ### Remix Icon
221
+ Open-source with filled and line variants in each icon, organized into semantic categories (system, business, media, communication, etc.). The parallel line/filled pairing makes it straightforward to communicate active vs. inactive states without switching libraries.
222
+
223
+ ### SF Symbols
224
+ Apple's system-native icon library, available exclusively on Apple platforms (iOS, macOS, watchOS, visionOS). Variable weights that match the San Francisco typeface — when the user adjusts text size or boldness in system settings, SF Symbols adjust proportionally. Not available for web or Android; use only in native Swift/SwiftUI or UIKit contexts. Access via `Image(systemName:)` in SwiftUI.
225
+
226
+ ### Feather
227
+ A minimal, classic icon set with 287 icons on a 24px grid at a 2px stroke. MIT licensed. Feather is older than many alternatives on this list and receives fewer updates, but its visual grammar is exceptionally clean and it remains a reliable choice for products that prioritize restraint. The limited catalog means it works best for simple, focused applications rather than complex dashboards.
228
+
229
+ ---
230
+
231
+ *This reference governs all icon decisions within the get-design-done framework. Deviations require explicit justification in `.design/DESIGN-CONTEXT.md` as a C-XX constraint.*
@@ -283,3 +283,105 @@ document.querySelectorAll('.reveal').forEach(el => observer.observe(el));
283
283
  3. For many elements, share a single observer instance and call `observe()` once per element.
284
284
  4. Prefer CSS transitions triggered by a class toggle over requestAnimationFrame loops.
285
285
  5. Use `will-change: transform, opacity` sparingly (only on elements that animate repeatedly).
286
+
287
+ ---
288
+
289
+ ## MIFB Micro-Motion Extensions
290
+ Source: jakubkrehel/make-interfaces-feel-better (MIT) — motion.md
291
+
292
+ ### Interruptible Animations
293
+
294
+ Use CSS transitions for interactive elements because transitions retarget mid-animation — when a user moves their cursor away before a hover animation completes, the transition reverses smoothly from wherever it currently is. Keyframe animations restart from the beginning, creating a jarring jump.
295
+
296
+ **Decision rule:**
297
+ - Interactive states (hover, focus, active, pressed): always CSS transitions
298
+ - Orchestrated sequences, entrance effects, data-driven animations: keyframe or JS animation
299
+
300
+ ```css
301
+ /* Good — transition retargets smoothly */
302
+ .button { transition: background-color 150ms ease-out; }
303
+
304
+ /* Avoid for interactive — restarts on interruption */
305
+ .button:hover { animation: hover-bg 150ms ease-out forwards; }
306
+ ```
307
+
308
+ ### Split-and-Stagger Enter/Exit
309
+
310
+ For multi-element entrances (card grids, lists, feature sections):
311
+
312
+ - Default stagger: 100ms between elements
313
+ - Heading words: 80ms per word
314
+ - Entrance transform: `opacity: 0 → 1` + `translateY(12px → 0)` + `blur(4px → 0)`
315
+ - Entrance duration: 300ms, `ease-out`
316
+ - Exit transform: `opacity: 1 → 0` + `translateY(0 → -12px)` (opposite direction, smaller offset)
317
+ - Exit duration: 150ms (half the entrance duration — exits should be faster)
318
+
319
+ The blur component adds a depth cue that makes entrances feel less flat. Keep blur modest (4px) — the goal is a subtle focus effect, not a visible blur.
320
+
321
+ ### Contextual Icon Animations — Cross-Fade Pattern
322
+
323
+ When swapping two icons (e.g., play ↔ pause, chevron-up ↔ chevron-down, bookmark ↔ bookmarked), use this exact cross-fade spec:
324
+
325
+ **Framer Motion spring (preferred):**
326
+ - `scale: 0.25 → 1` (entering), `scale: 1 → 0.25` (exiting)
327
+ - `opacity: 0 → 1` (entering), `opacity: 1 → 0` (exiting)
328
+ - `filter: blur(4px) → blur(0)` (entering), `blur(0) → blur(4px)` (exiting)
329
+ - `transition: { type: "spring", duration: 0.3, bounce: 0 }` — **bounce MUST be 0**
330
+
331
+ **CSS fallback (no Framer):**
332
+ - Keep both icons in the DOM, one `position: absolute`
333
+ - Use `cubic-bezier(0.2, 0, 0, 1)` easing
334
+ - Duration: 200ms
335
+
336
+ The scale + blur combination creates a focus-snap effect that feels intentional rather than mechanical. The `bounce: 0` hard constraint exists because any bounce on a 0.25-scale origin point makes icons appear to "pop" invasively.
337
+
338
+ ### Scale on Press — Canonical Value
339
+
340
+ The canonical scale value for press feedback is **`0.96`**.
341
+
342
+ Rules:
343
+ - Never use `scale(0.95)` — too large, feels unresponsive
344
+ - Never use `scale(0.97)` — too subtle at high DPI, not perceived as feedback
345
+ - Never use `scale(0.98)` or higher — imperceptible
346
+ - `0.96` is the ONLY correct value for standard interactive elements
347
+
348
+ Tailwind: `active:scale-[0.96]`
349
+ Framer: `whileTap={{ scale: 0.96 }}`
350
+
351
+ For primary CTAs where maximum tactility is needed (purchase, send, confirm):
352
+ use `0.96` with a shadow reduction: `box-shadow: none` during press.
353
+
354
+ Deprecation note: earlier versions of `reference/checklists.md` referenced `scale(0.97)`. That entry has been reconciled. **0.96 is the canonical value.**
355
+
356
+ ### AnimatePresence initial={false}
357
+
358
+ When `AnimatePresence` wraps UI that exists in the DOM before it enters the animation scope (e.g., a tab panel that renders its first tab immediately, a dropdown that's already open on first load), use `initial={false}`:
359
+
360
+ ```tsx
361
+ <AnimatePresence initial={false}>
362
+ {isOpen && <motion.div key="panel" initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} />}
363
+ </AnimatePresence>
364
+ ```
365
+
366
+ Without `initial={false}`, Framer will animate the FIRST render of children — meaning UI that's immediately visible on page load will "fade in" unnecessarily. This creates a flash/flicker that signals poor craftsmanship.
367
+
368
+ **Rule:** Any `AnimatePresence` wrapping persistent UI should have `initial={false}`.
369
+
370
+ ### will-change — GPU Property Table
371
+
372
+ Only add `will-change` when you observe first-frame stutter on lower-end hardware. Do NOT add it preemptively — it consumes GPU memory continuously for every element that has it.
373
+
374
+ GPU-compositable properties (safe with will-change):
375
+ | Property | will-change value |
376
+ |----------|------------------|
377
+ | transform (translate, scale, rotate) | `transform` |
378
+ | opacity | `opacity` |
379
+ | filter (blur, brightness, contrast) | `filter` |
380
+ | clip-path | `clip-path` |
381
+
382
+ Never use `will-change: all` or `will-change: contents` — this forces the entire element and its subtree onto a new compositor layer, thrashing memory.
383
+
384
+ Remove `will-change` after the animation completes if applied dynamically:
385
+ ```js
386
+ element.addEventListener('transitionend', () => element.style.willChange = 'auto')
387
+ ```